GMSC Discussions

GeoMedia Smart Client community discussion board is where you can create, contribute and share information and knowledge in regards to configuring as well as working with GeoMedia Smart Client. Find your answers, share your knowledge and help build a strong GeoMedia Smart Client community.
Showing results for 
Search instead for 
Do you mean 
Reply
Occasional Contributor
Posts: 9
Registered: ‎07-17-2018
Accepted Solution

Emtpy feature list when using the "Import Feature From Database" dialogue with PostgreSQL

[ Edited ]

Dear Community

 

I would like to add new features from a PostgreSQL database to an existing Smart Client project using the "Import Feature From Database" dialogue. But the feature list is empty, see attachement. Since there is no error message, I assume that the connection is accepted by the PostgreSQL Server. 

I am using GMSC 16.6.65.2 and PostgreSQL 9.5.x. 

 

  • Are there any additional settings that I need to set in the PostgreSQL database?
  • Is there a logfile that gives more information on the statements?

 

Important: If I use the same connection parameters with Geomedia Professional, the feature list is populated. 

 

Thank you very much and kind regards.

Christian

Technical Evangelist
Posts: 853
Registered: ‎11-12-2015

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Hi Christian,

 

You can use the browser console (F12 most browsers) to check on the 'LoadFromDatabase' request and response.

This will give you some aditional information on the connection and returned results.

You will find the GMSC Administrator log file on the GMSC server at '~:\installdir\Program\Administrator\Log'.

Check it out for more information. You can change the level of logging there in the Web.config file of 'Administrator'

 

I myself use PostgreSQL Server 9.5.x connection against GMSC 16.6 and I dont see any issues with display of feature to import.

You may check that your connecting user has the DBO permission against those features, but outside of that there is not additional settings needed on this database loader type.

 

I hope that helps

Occasional Contributor
Posts: 9
Registered: ‎07-17-2018

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Hi Sclow
 
Thank you, Sclow, for your reply.
 
I used the browser console and it seems, that in our case the 'LoadFromDatabase' response is empty...
 
Meanwhile, it figured out, that the PostgreSQL database is allready on version 9.6.18. Could that cause the problem?
 
The PostGIS-Versions are:
postgis24_96.x86_64              2.4.8-10.rhel7              @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64
postgis24_96-client.x86_64       2.4.8-10.rhel7              @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64
pgrouting_96.x86_64              2.6.2-1.rhel7               @imx_product_3rd_party_postgresql_repository_postgresql96_rhel7_x86_64

Technical Evangelist
Posts: 853
Registered: ‎11-12-2015

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Yes, the response is empty. This makes sense and we confirm this when there is no features listed to Import. Can you confirm that the 'LoadFromDatabase' connects ie. its not in error?

If yes, then you should explore the connecting user permissions. Does that user have DBO rights on the features in that database?

 

PostgreSQL 9.6 shouldn't be a problem. Minimum required with GMSC 16.6 is 9.3 and I can work just as well with 9.5 even.

 

Occasional Contributor
Posts: 9
Registered: ‎07-17-2018

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

I have new information: The PostGreSQL is using different schemas. Is there a way to specify a specific schema in GMSC?

Technical Evangelist
Posts: 853
Registered: ‎11-12-2015

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Hi Christian,

 

There was a bug in past versions of GMSC that did not allow for features outside of the 'public' schema to be imported.

That bug was fixed prior to your version of GMSC 16.6.

Schemas other than 'public' should be indicated by their 'schemaname.featurename' in the import features list.

 

Here is example of GMSC 16.6 showing features from both 'public' and 'names' schema available for import.

schemas.png

Technical Evangelist
Posts: 853
Registered: ‎11-12-2015

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Christian,

 

I would also recommend using PGAdmin to monitor the PostgreSQL database and in that way you can track the SQL statement against the database and from that gleen information related to your results in the GMSC Administrator.

 

I hope that helps

Occasional Contributor
Posts: 9
Registered: ‎07-17-2018

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

[ Edited ]

Hi 

 

I checked with the PG Admin Tool. We send the following SQL statement: 

 

 
Select geometrie, geometrie_GDO From stzh.zwn_meldungen_p Where geometrie Is Not Null Limit 1

 

This results in an error since the column "geometrie_GDO" does not exist: 

 

ERROR: column "geometrie_gdo" does not exist
LINE 1: Select geometrie, geometrie_GDO From stzh.zwn_meldungen_p Wh...

Is there some additional configurations that we have to to, either in GMSC or in the database?

 

Thank you and regards. 

Christian

Contributor
Posts: 32
Registered: ‎10-12-2015

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Hi there,

 

You need to have 2 geometry columns for the feature to work in PostgreSQL:

  1. Type "geometry"
  2. Type "bytea"

 

Example:

   "envelope" "public"."geometry" NOT NULL,
   "envelope_gdo" bytea NOT NULL

or 

   "geometry_spa" "public"."geometry",
   "geometry" bytea

 

Hope it helps,

Cosmin

Occasional Contributor
Posts: 9
Registered: ‎07-17-2018

Re: Emtpy feature list when using the "Import Feature From Database" dialogue with Postgre

Hi Cosmin

 

Thanks for your reply, this ws the solution that worked for me. 

 

In the meantime I have created a support ticket, so that this solution is included in the official documentation.

 

Kind regards

Christian