POST
|
Okay. I think my code was wrong here's the recoded one for AGSSpatialReference. AGSSpatialReference *svy21 = [[AGSSpatialReference alloc] initWithWKID:3414
WKT:@"PROJCS[\"SVY21 / Singapore TM\",GEOGCS[\"SVY21\",DATUM[\"D_\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",1.366666666666667],PARAMETER[\"central_meridian\",103.8333333333333],PARAMETER[\"scale_factor\",1],PARAMETER[\"false_easting\",28001.642],PARAMETER[\"false_northing\",38744.572],UNIT[\"Meter\",1]]"];
AGSSpatialReference *wgs84 = [[AGSSpatialReference alloc] initWithWKID:4326
WKT:@"GEOGCS[\"GCS_WGS_1984\",DATUM[\"D_WGS_1984\",SPHEROID[\"WGS_1984\",6378137,298.257223563]],PRIMEM[\"Greenwich\",0],UNIT[\"Degree\",0.017453292519943295]]"];
I still can't figure out how to use projectGeometries:toSpatialReference method. Pardon me.
... View more
06-23-2010
11:18 PM
|
0
|
0
|
589
|
POST
|
I've coded this assuming from the code I need the coords lon, lat stored in an NSArray and toSpatialReference output Spatial Reference Thus. Declare and initialize the output spatial reference. AGSSpatialReference *osr;
osr = [[AGSSpatialReference alloc] initWithWKID:3414
WKT:@"SVY21"]; I'm not sure how to store lon, lat in NSArray. Currently they are in double. double lat = location.coordinate.latitude;
double lon = location.coordinate.longitude; Lastly to I need to know how to use that methodd projectGeometries: lon,lat toSpatialReference: osr Are my codes correct? Hi Nimesh, I've looked into GeometryServiceTaskDemo but still do not understand it. I need to mention that this if my first time coding on iPhone so I'm unfamiliar with Objective-C. You mentioned about projectGeometries:toSpatialReference. - (NSOperation *) projectGeometries: (NSArray *) geometries
toSpatialReference: (AGSSpatialReference *) spatialReference How should I code the method for my case? I've tried around different code but due to lack of experience with Objective-C I've got no idea how to get it to work. Your help would be greatly appreciated! Regards, Royston
... View more
06-23-2010
12:48 AM
|
0
|
0
|
589
|
POST
|
I would suggest you to look into the GeometryServiceTaskDemo sample app which has a code to buffer the geometries. It will give you an idea to work with geometry service task and similarly you can use projectGeometries:toSpatialReference: method to project the geometry. It get installed with SDK at ~/Library/SDKs/Samples. Please feel free to let me know if you need any further help! Regards, Nimesh Hi Nimesh, I've looked into GeometryServiceTaskDemo but still do not understand it. I need to mention that this if my first time coding on iPhone so I'm unfamiliar with Objective-C. You mentioned about projectGeometries:toSpatialReference. - (NSOperation *) projectGeometries: (NSArray *) geometries
toSpatialReference: (AGSSpatialReference *) spatialReference How should I code the method for my case? I've tried around different code but due to lack of experience with Objective-C I've got no idea how to get it to work. Your help would be greatly appreciated! Regards, Royston
... View more
06-22-2010
06:28 PM
|
0
|
0
|
589
|
POST
|
Hi guys, I'm new to ArcGIS as well as iPhone development. Right now I'm working on a school project and I need to perform this task of converting coords from WKID:4326 WGS84 to WKID:3414 SVY21. The map service I use is base on WKID:3414 and I'm trying to get Core Location to work thus I need to convert to SVY21 (WKID:3414). Can someone assist me in creating the function to convert the coords as I do not understand the API documentation with my level of programming knowledge. geometryServiceTaskWithURL: http://www.onemap.sg/ArcGIS/rest/services/Geometry/GeometryServer From WKID:4326 to WKID:3414 Would greatly appreciate help.
... View more
06-21-2010
10:00 PM
|
0
|
5
|
4044
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|