Re-projection information 2

3 messages Options
Embed this post
Permalink
Langen, Gido

Re-projection information 2

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

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:
  }
}


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

Re: Re-projection information 2

Reply Threaded More More options
Print post
Permalink
Is that a copy/paste?  If so, you have a typo in your $csTransformation definition (RSR instead of SRS)

Jason

2009/10/22 Langen, Gido <[hidden email]>

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:
  }
}


_______________________________________________
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
Langen, Gido

RE: Re-projection information 2

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)
Jason - Thanks for detecting such a stupid mistake; unfortunately, that wasn't the problem.  It still did not re-project even after fixing the typo.
Gido

 

From: [hidden email] [mailto:[hidden email]] On Behalf Of Jason Birch
Sent: October 22, 2009 19:13
To: MapGuide Users Mail List
Subject: Re: [mapguide-users] Re-projection information 2

Is that a copy/paste?  If so, you have a typo in your $csTransformation definition (RSR instead of SRS)

Jason

2009/10/22 Langen, Gido <[hidden email]>

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:
  }
}


_______________________________________________
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