0

I am given an ArcGIS polyline (or polypoint) from a WFS service (e.g. 1693669.5143, 5672605.5392), and am looking for a function (python, java, whatever) to convert it to a lat/lon so I can use it in Google Maps. I obviously have the projection as well.

I've googled this extensively but most of the results return ArcGIS's solution http://pro.arcgis.com/en/pro-app/tool-reference/data-management/add-xy-coordinates.htm - i.e. tool-specific

Is there an online tool or converter to do this, or (ideally) a function or library that I can use directly from code?

1

1 Answer 1

2

You can use the srsName= string to get the polyline from the WFS in lat/lon coordinates from the start.

Alternatively, provided that you've read the coordinate strings into Python as arrays x and y, you can do

import pyproj
prj = pyproj.Proj(PROJ4_STRING)
lon, lat = prj(x, y, inverse=True)

where PROJ4_STRING is the libproj SRS string for the original projection.

1
  • Can you post an example on how to use srsName?
    – raven
    Jul 20, 2016 at 21:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.