Hello,
I'm quite new to using GIS in general and conscious of some ignorance on my side but here's the problem: I'm trying to use the online ArcGIS REST service to calculate areas and lengths of polygons. I'm working in WGS84 (ECGS:4236) coordinate system. I've been trying to get the same done using the Google Maps JS API but that requires to physically build HTML content and bootstrap the API from there. I don't like that and don't need that. Hence, my experiment with ArcGIS.
Based on the tutorials for the geometry "Areas and Lengths" service I constructed the following polygon definition:
[{"rings":[[[4.4598942,52.0477526],[4.4603368,52.0477295],[4.4618683,52.0451429],[4.4592317,52.0445375],[4.4598942,52.0477526]]]}]
This describes a small polygon area of my neighborhood in world coordinates (longitude, latitude).
I have passed the areaUnit as: {"areaUnit" : "esriHectares"} and the lengthUnit as 9001 (International meter).
I'm passing 4326 as the WKID to match the world coordinate system.
The response I get back from the API call is the following (in JSON):
{"areas":[1.3990022088844E-13],"lengths":[0.000164707662238204]}The value are extremely small and not according my expectations. Both in QGIS and Google Maps the area should be around 3.5 Ha.
I've been using the following URL: http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Geometry/GeometryServer/areasAndLengths
I've been playing with the ring definition, e.g. swapping coordinates and making sure the winding order is clockwise. I've also played with different coordinate systems and area units but still getting back values that don't make sense.
I would appreciate some guidance from the GIS experts here in telling me what I'm doing wrong.
Thanks for your help.
--Paul