[mapguide-users] get the coordinate system of selected objects
peterweber1955 at web.de
Sun Sep 28 12:06:22 PDT 2014
This is my problem.
Here a snippet from buffer.php (fusion):
$ctxs = $featureSrvc->GetSpatialContexts($featSourceId, false);
$srsDefDs = "";
if($ctxs != null && $ctxs->ReadNext())
$srsDefDs = $ctxs->GetCoordinateSystemWkt();
it returns only the first coordinate system wkt (in my opinion a bug), but
this is not necessary the coordinate system of the features.
Of course you can get all coodinate systems of the data source, but dont
know which is used for the selected features (or the layer).
If you overrride the coordinate system you get the wkt with
GetCoordinateSystem(). If you delete all other CoordinateSystemOverrides
GetCoordinateSystem() returns the coordinate system wkt you need or an empty
string. GetCoordinateSystemWkt() returns still all coordinate system wkts
from the orign datasource.
View this message in context: http://osgeo-org.1560.x6.nabble.com/get-the-coordinate-system-of-selected-objects-tp5164590p5164615.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
More information about the mapguide-users