GPS Coordinates to WKID 102100

المشرف العام

Administrator
طاقم الإدارة
I'm currently creating a project for ios and I'm using the latest ArcGIS IOS api. I have a mapView that is using the spatial reference skid 102100 and i am receiving lat long coordinates from an external GPS device (NMEA 0183 messages). I believe NMEA 0183 uses WGS84. I want to display the location from the GPS to my mapView. I tried creating a AGSPoint based on the GPS lat long with WGS84 spatial reference and projecting it to my mapView's spatial reference but the point seems to be at the middle of my map, which i assume is wrong because im in Canada.

Can anybody help me pls?

I think the reason could be that my mapView has a unit of measure of Meters and the GPS is sending dddmm.mmmmmmm data (d=degrees, m=minutes).

here is my projection code:

AGSPoint *tempPoint = [[AGSPoint alloc] initWithX:longitudeValue y:latitudeValue spatialReference:[AGSSpatialReference wgs84SpatialReference]]; AGSPoint *projectedPoint = (AGSPoint *)[self.geometryEngine projectGeometry:temp2 toSpatialReference:self.mapView.spatialReference]; Do still need to convert the lat/long to meters before i project it? if yes, how?

Thanks.



أكثر...
 
أعلى