Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am seeing a strange issue in 10.0 mobile version. If a convert a coordinate (x.x,y.y) to WGS84 using mobilecache1.spatialreferece.towgs84 and if I convert the resulting GPS coordinate back to map coordinates using mobileCache1.SpatialReference.FromWgs84, the resulting mapcoordinates does not match the original map coordinates. Its about 30 to 50 m off, depending on the mobilecache spatial reference. Below is the piece of the code, I used to test this. However in 9.3.1 the same function works fine and , the resulting coordinates match close to a decimal point.

Has anybody seen this ?? and is there a workaround or an alternate method to convert GPS coordinates to map coordinates.

private void TestTransformations()
{

Coordinate coordinate = new Coordinate( 245649.4, 3280766.6 );
Coordinate gpsCoordinate = mobileCache1.SpatialReference.ToWgs84( coordinate ); 
Coordinate coord = mobileCache1.SpatialReference.FromWgs84( gpsCoordinate.X,gpsCoordinate.Y);
MessageBox.Show( coord.X + " " + coord.Y );


}

Thanks,

share|improve this question

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.