Hexagon Geospatial
MENU

GeoMedia

Search for an answer, post a question, or answer other users' questions in our GeoMedia support discussions. This discussion board is a great way to collaborate with industry peers around the world. It is intended for discussion and support of the GeoMedia Desktop and Add-on applications.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 120
Registered: ‎11-17-2015
Accepted Solution

GeoMedia 2016 + AFM + PostGIS -> Cannot import AFM model

Hello,

 

I have successfully created my PostGIS database and import data from access warehouse using GM (I have created the metadata tables using the DB utility providing only one option for PostGIS metadata creation).

I have checked the option "Enable advanced feature model" for PostGIS connection.

When trying to import an AFM model stored in XML I get first a "success" message but then another message saying that "the connection doesn't support feature model. Must first convert",

So I try to use the "Convert" command and then I get an error message (2 times) saying (in french):

ERROR: error in syntax at the end of line 1: SELECT * FROM ^  

 

I had no problem with this procedure in SQL Server 2008 (I didn't have to use the "Convert" command.

 

Thank you for any help.

Yohann.

Highlighted
Frequent Contributor
Posts: 120
Registered: ‎11-17-2015

Re: GeoMedia 2016 + AFM + PostGIS -> Cannot import AFM model

I managed to import the AFM model by changing the connected user to postgres (superuser).

It's a right permission problem for the user I have created.

 

Yohann. 

Staff
Posts: 156
Registered: ‎02-02-2016

Re: GeoMedia 2016 + AFM + PostGIS -> Cannot import AFM model

Another reason you might get the error you mention is when the AFM metadata does not exisit. If the AFM metadata does not exist, the Advanced > Feature Model command with right-click on the connection with the 'Convert to AFM' option will result in the following errors:


Error converting the connection to AFM.
ERROR: syntax error at end of inputLINE 1: SELECT * FROM ^
ERROR: syntax error at end of inputLINE 1: SELECT * FROM ^

 

The AFM metadata tables are created using a script (similar to the AFM metadata creation process for Oracle or SQL); specifically, the metadata script delivered for AFM Metadata creation for PostGIS is delivered to:
C:\Program Files (x86)\Common Files\Intergraph\GeoMedia\Program\CreateAFMMetadata_PostGIS.sql

The Advanced > Feature Model command will only work correct after the AMF specific metadata tables have been using the CreateAFMMetadata_PostGIS.sql script.

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.