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'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.

share|improve this question
    
i think i got it. after a couple of trial and errors i seem to got the right projection. Here is what i have done: 1. From the given lat/long values from the GPS. i converted it to decimal degrees. 2. Added the necessary signs(either negative or positive) based on the direction. 3. Created an AGSPoint with a WGS84 spatial reference. 4.(Im not sure i still need this step) Projected the point to a WGS84 spatial reference. 5. Projected in again to 102100 spatial reference. –  Juno May 23 '13 at 6:13
    
You're doing it right but you don't need step 4, the point you created is already wgs84. Btw, 102100 is a Mercator projection in meters, where WGS-84 is in decimal degrees. –  progrmr May 23 '13 at 14:22

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.