06-15-2018 04:18 AM
I've created a FeatureClass 'wspolne.lokalizacja' in GeoMedia2016. It contains 'geometry' and 'geometry_spa' fields. Then In GMSC2016 with postgreSql10 I've configured a feature (as geometry field I've set 'geometry_spa'). In GMSC I can draw feature and change it's geometry.
But there's a problem after changing geometry by sql query.
update wspolne.lokalizacja set geometry_spa=ST_GeomFromText('LINESTRING Z(638320.400137579 676458.512936817 0, 638282.59 686455.67 0)', 2180) where id=43
The problem is, that GMSC shows old version of the geometry. Reloading of the feature or even restarting GMSC java applet doesn't help.
I've checked how geometry looks in QGIS and it's correct there. I've also checked it in GeoMedia - it shows the same as GMSC.
What can be the reason?
Solved! Go to Solution.
06-15-2018 04:56 AM
there should not be reasons for showing the "old" version unless the feature is not live (featureloader). Please check Maps.log to understand what is going on (you can set it to debug mode and check the sql query issued to database).
Within GeoMedia you have to close and reopen the connection.
06-15-2018 05:59 AM - edited 06-15-2018 06:08 AM
Feature featureloader is set to 'live'.
GeoMedia shows still the same even after restarting GeoMedia.exe.
Maps.log - I would like to check it, but I cannot find in documentation how to switch logging on.
I've also checked sql issued to database and look as follows:
Select id, geometry_spa, geometry From (select * from wspolne.lokalizacja where zi_id is not null) SC_ENTITYSQL Where st_intersects(geometry_spa, (('\x0103000020840800000100000005000000003C3BBAC4C07EC0049A083B01BDFF4068479718B8722F41049A083B01BDFF4068479718B8722F41C0EC9ED8BFCD2741003C3BBAC4C07EC0C0EC9ED8BFCD2741003C3BBAC4C07EC0049A083B01BDFF40')::bytea)) = true
06-15-2018 07:34 AM
and is the result what you expect?
logging is already enabled, but by default only errors are written, you just have to change the log level in the web.config file of MapService.
06-18-2018 01:57 AM
MapServce log looks as follows. The sql query seems to be the same, as in postreSql log. Notice, that the sql query gets not only geometry_spa column but also geometry column. If GMSC doesn't use geometry column, why does it get it in sql query then?
18.06.2018 10:26:11 DEBUG - Query for DisplayRule: Select id, geometry_spa, geometry From (select * from wspolne.lokalizacja where zi_id is not null) SC_ENTITYSQL Where st_intersects(geometry_spa, @RANGE) = true
18.06.2018 10:26:11 DEBUG - Range for DisplayRule Query: POLYGON ((620516.42203125032 669145.00578541716, 652733.80743125034 669145.00578541716, 652733.80743125034 689456.95398541715, 620516.42203125032 689456.95398541715, 620516.42203125032 669145.00578541716))
18.06.2018 10:26:11 DEBUG - Query (Layer 18) finished in: 00:00:00.005
18.06.2018 10:26:11 DEBUG - Map (Layer 18) finished in: 00:00:00.008
I've made dump of this table in SQL format. Can you check it? database dump.
06-21-2018 10:26 PM
it appears that both GeoMedia and GMSC are still reading the geometry blob field. Please set the content of that field to NULL to have GMSC reading the native geometry.
06-22-2018 01:05 AM
It looks like, when geometry field is null then GMSC displays geometry from geometry_spa.
So the problem is, that geometry and geometry_spa fileds are not synchronized.
How can I synchronize geometry field according to geometry_spa field content? Is there any GMSC API function for this, or any way to do it using sql query?
06-22-2018 11:32 PM
why do you need them synchronized? the geometry blob is a GeoMedia internal way of representing the geometry, you cannot this by sql. You may ask GeoMedia's team how to do it using GM's API.
06-23-2018 10:06 PM
My 2 cents worth - If you are editing outside both the GeoMedia / GMSC environment that implies you no longer want the original GDO blob field.
Given both GeoMedia and GMSC will both happily read the SPA field, when you modify the geometry_spa outside of GeoMedia / GMSC, simply set the Geometry (GDO Blob) field to null.
Note: the Geometry (GDO Blob) field is only populated by GeoMedia or GMSC if the geometry cannot be 100% represented in that native geometry_spa field. Refer the GeoMedia online help guide for details of when the GDO field is populated. (rules apply to both GeoMedia and GMSC)
GeoMedia Help > Overview of GeoMedia > Using PostGIS Connections > Delivery and Connection > PostGIS Warehouse Requirements, in particular 'Geometry Storage' and 'GeoMedia's Binary Geometry to Native Geometry Type Matching'. When you edit outside of GeoMedia / GMSC then you are accepting the representation of the 3rd party editor using the lowest common denominator of the native geometry_spa field representation.