Select to view content in your preferred language

Help with Coordinate Conversion Using ArcGIS GeometryService

185
2
10-09-2024 09:00 PM
swuell
by
New Contributor

Hello,

I’m currently working on a web application that needs to handle coordinate conversion from WGS84 (used in Google Maps) to NAD83 State Plane Zones, using EPSG codes. The goal is to convert geometries drawn by users (like polylines and polygons) and export them into .shp files for use in external CAD software.

Issues:

  1. The getTransformations() method seems to be missing on the GeometryService object, and I’m unsure how to retrieve and apply the necessary geographic transformations.
  2. There’s a type mismatch error with the geometryService.project() method, where it expects a string, but we’re passing an array of Polygons (some of which may be undefined). 

Questions:

  • What’s the correct way to handle geographic transformations when converting geometries from WGS84 to NAD83 using the ArcGIS API?
  • Are there specific methods or workflows to use with GeometryService for this type of coordinate conversion?
  • Any examples or documentation for handling this would be very helpful.

Thanks in advance for your support and guidance!

Sam

0 Kudos
2 Replies
AndyGup
Esri Regular Contributor

@swuell  it sounds like you might be looking for the API's projection engine: https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-projection.html#project. This functionality can be run on the client, so no need for a server round-trip.

0 Kudos
swuell
by
New Contributor

@AndyGup 

I looked into the esri/geometry/projection API, and it seems promising. However, I want to confirm - does this fully replace the need for using GeometryService for coordinate conversion from WGS84 to NAD83 State Plane Zones? My goal is to ensure that the conversion is accurate for polylines and polygons, and then export the data into .shp files.

Would this client-side projection method handle everything without needing a geographic transformation, or do I still need to account for transformation parameters when converting between these coordinate systems?

Thanks for the help!

0 Kudos