I am using Python script for accessing this API for getting madrid traffic data. But I am really confused on how to get the geographic coordinates from this data. It has 2 fields st_x and st_y which I feel contain the information for the coordinates. I want to get those coordinates in lat long.

Data for one location

  • 2
    Welcome! What software do you have access to? The coordinate reference system is probably EPSG:25830 or less likely, EPSG:23030. – mkennedy Aug 31 '19 at 15:35
  • Ohh, but there are 2 coordinates for st_x and st_y so total 4 coordinates in total how does that makes sense. – B RAGHUNATHAN Aug 31 '19 at 18:41
  • 1
    The commas are the decimal delimiter. – mkennedy Aug 31 '19 at 18:44
  • Ohh, thank you so much @mkennedy !!! – B RAGHUNATHAN Aug 31 '19 at 18:48
  • 2
    Please always provide data as formatted text rather than pictures so that can be easily copied for testing. Also, any coding question should include a code snippet that illustrates what you have tried and where you are stuck. – PolyGeo Aug 31 '19 at 19:30

Could be useful to calculate the coordinates: https://github.com/bewest/proj4js or https://www.npmjs.com/package/utm-latlng

| improve this answer | |
  • I used pyproj for conversion – B RAGHUNATHAN Sep 4 '19 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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