[mapguide-users] get the coordinate system of selected objects

Jackie Ng jumpinjackie at gmail.com
Sun Sep 28 19:08:52 PDT 2014

Follow this chain:

 - Get the MgClassDefinition of either the reader or the originating Feature
    - Get the MgGeometricPropertyDefinition of the designated geometry
       - Note the name of the spatial context association
       - Invoke MgFeatureService.GetSpatialContexts()
       - Loop through the MgSpatialContextReader until you find a record
whose name matches the above association
           - The associated coordinate system information here is the
coordinate system used by the objects in the MgFeatureReader

As to what is the difference between GetCoordinateSystem and

In my observations you want to use GetCoordinateSystem for RDBMS-based
Feature Sources and GetCoordinateSystemWkt for everything other Feature
Source. GetCoordinateSystem is generally the CS-Map coordinate system code.
GetCoordinateSystemWkt is somewhat meaningless in the RDBMS context as these
RDBMSes have their own SRID management. 

I know everytime I tried to create an RDBMS data store in FDO Toolbox, it
completely disregarded the coordinate system WKT I specified and just went
with the coordinate system code. This was the case of SQL Server, and since
all RDBMS-based providers are derived from the same common codebase, you
could probably extrapolate this behaviour to the other providers (MySQL,
PostgreSQL) as well.

- Jackie

View this message in context: http://osgeo-org.1560.x6.nabble.com/get-the-coordinate-system-of-selected-objects-tp5164590p5164632.html
Sent from the MapGuide Users mailing list archive at Nabble.com.

More information about the mapguide-users mailing list