Select to view content in your preferred language

Issue with Java API UTM Conversion with North / South indicators

2872
1
Jump to solution
09-11-2015 07:47 AM
BryanWarner
New Contributor

I am using the Java API and trying to convert a UTM coordinate with north / south indicators to a point using the CoordinateConversion.utmToPoint method.

I supply the conversion mode UTMConversionMode.North_South_Latitude_Indicators  and a coordinate of 21S 757318 7117825. The point should be in South America (S is used as the hemisphere indicator), however, the point returned by the conversion is X = -54.63688 Y=66.0391686. Converting that back to UTM produces 21W 607069 7326294, which is near the artic circle and should have returned UTM point 21J 757318 7117825. The latitude band may or may not be known by our users, who will often only be able to supply a north / south indicator. 

My method call is:

CoordinateConversion.utmToPoint(coordinate, spatialReference, ConversionMode.NORTH_SOUTH_LATITUDE_INDICATORS);

where coordinate = 21S 757318 7117825 and spatialReference is WGS84

Any help would be appreciated.

0 Kudos
1 Solution

Accepted Solutions
BryanWarner
New Contributor

Solved, sort of. If I set the latitude band to any letter in the southern hemisphere the conversion works correctly. So, instead of using 'S' to denote the southern hemisphere I use 'M'. I believe there is a bug and the conversion mode does not work correctly, but this is a suitable work around.

View solution in original post

0 Kudos
1 Reply
BryanWarner
New Contributor

Solved, sort of. If I set the latitude band to any letter in the southern hemisphere the conversion works correctly. So, instead of using 'S' to denote the southern hemisphere I use 'M'. I believe there is a bug and the conversion mode does not work correctly, but this is a suitable work around.

0 Kudos