[mapguide-users] Re-projection information 2

Langen, Gido Gido.Langen at NRCan-RNCan.gc.ca
Thu Oct 22 16:43:33 EDT 2009


I should have included my code in the previous message; may-be somebody
can see what's wrong with it.
Thanks,
Gido 


$coordSysFactory = new MgCoordinateSystemFactory();
$sourceSRS = $coordSysFactory->Create($featureSRS);
$targetSRS = $coordSysFactory->Create($mapSRS);
$csTransformation = $coordSysFactory->GetTransform($sourceSRS,
$targetRSR);

$parcelQuery = new MgFeatureQueryOptions();
try {
  $featureReader = $layer->SelectFeatures($parcelQuery);
  while($featureReader->ReadNext()) {
    $attVal = $featureReader->GetString("PARCELDESI");
    $geoObj = $featureReader->GetGeometry("Geometry");
    $newObj = $geoObj->Transform($csTransformation);  <<===== Fails: 
  }
}

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapguide-users/attachments/20091022/eb4cbc9c/attachment.html


More information about the mapguide-users mailing list