Re-projection information

2 messages Options
Embed this post
Permalink
Langen, Gido

Re-projection information

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Re-projection information

Does anyone know of good sample code that illustrates how to re-project features/coordinates on the fly in MapGuide?
Thanks,
Gido


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Langen, Gido

FW: Re-projection information

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Re-projection information
FYI: Here is the solution to my question in case anybody else needs it.
 
$featureReader = $layer->SelectFeatures($parcelQuery);
  
while($featureReader->ReadNext()) {
    $PIN = $featureReader->GetDouble("PIN");
    $agfObj = $featureReader->GetGeometry("Geometry");
    $agfRW  = new MgAgfReaderWriter();
    $geoObj = $agfRW->Read($agfObj);
    $wktRW  = new MgWktReaderWriter();
    $wktObj = $wktRW->Write($geoObj);
   
    $wktLLcoords = $wktObj;
    $LLcoords = substr($wktLLcoords, 10);
    $Pos = strpos($LLcoords, ",");
    $LLcoord = substr($LLcoords, 0, $Pos);
    $Pos = strpos($LLcoord, " ");
    $Lat = substr($LLcoord, 0, $Pos);
    $Long = substr($LLcoord, $Pos);
   
    $geometryFactory = new MgGeometryFactory();
    $coordLL = $geometryFactory->CreateCoordinateXY((double)$Lat, (double)$Long);
    $coordEN = $LL2LamCC->Transform($coordLL);
    $Easting = $coordEN->GetX();
    $Northing = $coordEN->GetY();
}


From: [hidden email] [mailto:[hidden email]] On Behalf Of Langen, Gido
Sent: October 22, 2009 13:06
To: [hidden email]
Subject: [mapguide-users] Re-projection information

Does anyone know of good sample code that illustrates how to re-project features/coordinates on the fly in MapGuide?
Thanks,
Gido


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users