-1

I have downloaded some ArcGIS data from here:

ArcGIS Data

and there is an explanation of the schema here:

ArcGIS Data Documentation

How do I convert the values in the array to lat/long? i.e.

Here's a snippet of the array:

"geometry":{"rings":[[[-9261296,4866613],[-9261240,4866160],[-9260975,4866191],[-9260945,4865884], ...]]}

Can you point me to a Python library that does this transformation?

  • 2
    GeoJSON is a geographic coordinate system format, so you need to do 2 before 1. We have a One question per Question policy, so please Edit the question to focus on your effort at reprojection. – Vince May 23 '19 at 21:50
  • 1
    You had tags for ArcGIS Desktop, ArcPy, Mapbox and GeoPandas but do not appear to be using any of them in the code that you have presented, so I am removing them and adding a Python tag in their place. – PolyGeo May 23 '19 at 22:10
  • Please include a tiny sample of the data that you are using as formatted text within your question. Not all potential answerers will follow links to find it. – PolyGeo May 23 '19 at 22:12
  • Thank you - I've edited the question to make it more specific. I've left the original links in place just as a reference. – vgoklani May 23 '19 at 22:34
  • Take a look at this answer: gis.stackexchange.com/questions/13029/… You should be able to to it by using ogr2ogr (part of GDAL) if you don't have access to ESRI software. Add the parameter -t_srs "EPSG:4326" to the command in that answer to get the converted coordinates. – PhilippNagel May 24 '19 at 13:50
1

ArcGIS REST Services can do the re-projection for you:

use:

http://maps.franklincountyauditor.com/fcaags/rest/services/BOEL/ElectionResults/MapServer/0/query?f=json&spatialRel=esriSpatialRelIntersects&maxAllowableOffset=38&geometry=%7B%22xmin%22%3A-9275174.760250824%2C%22ymin%22%3A4872401.931030698%2C%22xmax%22%3A-9255606.881009845%2C%22ymax%22%3A4891969.810271677%2C%22spatialReference%22%3A%7B%22wkid%22%3A102100%7D%7D&geometryType=esriGeometryEnvelope&inSR=102100&outFields=*&outSR=4326

The results will be like:

    {
"displayFieldName": "NAME",
"fieldAliases": {
"OBJECTID": "OBJECTID",
"PRECINCTID": "Precinct ID",
"NAME": "Precinct Name",
"COUNTY": "County",
"ESS_PRECINCT_NO": "ESS_PRECINCT_NO",
"ESS_PRECINCT": "ESS_PRECINCT",
"CITY_OR_VILLAGE": "CITY_OR_VILLAGE",
"SCHOOL_DISTRICT": "SCHOOL_DISTRICT",
"TOWNSHIP": "TOWNSHIP",
"HOUSE_DISTRICT": "HOUSE_DISTRICT",
"SENATE_DISTRICT": "SENATE_DISTRICT",
"CONGRESS_DISTRICT": "CONGRESS_DISTRICT",
"POLICE_DISTRICT": "POLICE_DISTRICT",
"ROAD_DISTRICT": "ROAD_DISTRICT",
"FIRE_DISTRICT": "FIRE_DISTRICT",
"PARK_DISTRICT": "PARK_DISTRICT",
"COURT_APPEALS_NAME": "COURT_APPEALS_NAME",
"BOARD_OF_ED_NAME": "BOARD_OF_ED_NAME",
"LIBRARY": "LIBRARY",
"EDUCATIONAL_SERVICE_CENTERS": "EDUCATIONAL_SERVICE_CENTERS",
"CAREER_CENTERS": "CAREER_CENTERS",
"WINNINGPARTY": "Winning Party",
"TOTALBALLOTS": "Total Ballots",
"SHAPE_Length": "SHAPE_Length",
"SHAPE_Area": "SHAPE_Area",
"POLLINGID": "POLLINGID",
"POLLINGLOCATION": "POLLINGLOCATION",
"LID": "LID",
"Symbol": "Symbol"
},
"geometryType": "esriGeometryPolygon",
"spatialReference": {
"wkid": 4326,
"latestWkid": 4326
},
"fields": [
{
"name": "OBJECTID",
"type": "esriFieldTypeOID",
"alias": "OBJECTID"
},
{
"name": "PRECINCTID",
"type": "esriFieldTypeString",
"alias": "Precinct ID",
"length": 10
},
{
"name": "NAME",
"type": "esriFieldTypeString",
"alias": "Precinct Name",
"length": 50
},
{
"name": "COUNTY",
"type": "esriFieldTypeString",
"alias": "County",
"length": 50
},
{
"name": "ESS_PRECINCT_NO",
"type": "esriFieldTypeString",
"alias": "ESS_PRECINCT_NO",
"length": 255
},
{
"name": "ESS_PRECINCT",
"type": "esriFieldTypeString",
"alias": "ESS_PRECINCT",
"length": 255
},
{
"name": "CITY_OR_VILLAGE",
"type": "esriFieldTypeString",
"alias": "CITY_OR_VILLAGE",
"length": 255
},
{
"name": "SCHOOL_DISTRICT",
"type": "esriFieldTypeString",
"alias": "SCHOOL_DISTRICT",
"length": 255
},
{
"name": "TOWNSHIP",
"type": "esriFieldTypeString",
"alias": "TOWNSHIP",
"length": 255
},
{
"name": "HOUSE_DISTRICT",
"type": "esriFieldTypeString",
"alias": "HOUSE_DISTRICT",
"length": 255
},
{
"name": "SENATE_DISTRICT",
"type": "esriFieldTypeString",
"alias": "SENATE_DISTRICT",
"length": 255
},
{
"name": "CONGRESS_DISTRICT",
"type": "esriFieldTypeString",
"alias": "CONGRESS_DISTRICT",
"length": 255
},
{
"name": "POLICE_DISTRICT",
"type": "esriFieldTypeString",
"alias": "POLICE_DISTRICT",
"length": 255
},
{
"name": "ROAD_DISTRICT",
"type": "esriFieldTypeString",
"alias": "ROAD_DISTRICT",
"length": 255
},
{
"name": "FIRE_DISTRICT",
"type": "esriFieldTypeString",
"alias": "FIRE_DISTRICT",
"length": 255
},
{
"name": "PARK_DISTRICT",
"type": "esriFieldTypeString",
"alias": "PARK_DISTRICT",
"length": 255
},
{
"name": "COURT_APPEALS_NAME",
"type": "esriFieldTypeString",
"alias": "COURT_APPEALS_NAME",
"length": 255
},
{
"name": "BOARD_OF_ED_NAME",
"type": "esriFieldTypeString",
"alias": "BOARD_OF_ED_NAME",
"length": 255
},
{
"name": "LIBRARY",
"type": "esriFieldTypeString",
"alias": "LIBRARY",
"length": 255
},
{
"name": "EDUCATIONAL_SERVICE_CENTERS",
"type": "esriFieldTypeString",
"alias": "EDUCATIONAL_SERVICE_CENTERS",
"length": 255
},
{
"name": "CAREER_CENTERS",
"type": "esriFieldTypeString",
"alias": "CAREER_CENTERS",
"length": 255
},
{
"name": "WINNINGPARTY",
"type": "esriFieldTypeString",
"alias": "Winning Party",
"length": 75
},
{
"name": "TOTALBALLOTS",
"type": "esriFieldTypeDouble",
"alias": "Total Ballots"
},
{
"name": "SHAPE_Length",
"type": "esriFieldTypeDouble",
"alias": "SHAPE_Length"
},
{
"name": "SHAPE_Area",
"type": "esriFieldTypeDouble",
"alias": "SHAPE_Area"
},
{
"name": "POLLINGID",
"type": "esriFieldTypeString",
"alias": "POLLINGID",
"length": 15
},
{
"name": "POLLINGLOCATION",
"type": "esriFieldTypeString",
"alias": "POLLINGLOCATION",
"length": 255
},
{
"name": "LID",
"type": "esriFieldTypeString",
"alias": "LID",
"length": 5
},
{
"name": "Symbol",
"type": "esriFieldTypeString",
"alias": "Symbol",
"length": 1
}
],
"features": [
{
"attributes": {
"OBJECTID": 2298,
"PRECINCTID": "01069A",
"NAME": "COLUMBUS 69-A",
"COUNTY": null,
"ESS_PRECINCT_NO": null,
"ESS_PRECINCT": null,
"CITY_OR_VILLAGE": null,
"SCHOOL_DISTRICT": null,
"TOWNSHIP": null,
"HOUSE_DISTRICT": null,
"SENATE_DISTRICT": null,
"CONGRESS_DISTRICT": null,
"POLICE_DISTRICT": null,
"ROAD_DISTRICT": null,
"FIRE_DISTRICT": null,
"PARK_DISTRICT": null,
"COURT_APPEALS_NAME": null,
"BOARD_OF_ED_NAME": null,
"LIBRARY": null,
"EDUCATIONAL_SERVICE_CENTERS": null,
"CAREER_CENTERS": null,
"WINNINGPARTY": null,
"TOTALBALLOTS": null,
"SHAPE_Length": 26042.304427102423,
"SHAPE_Area": 14032780.421679573,
"POLLINGID": null,
"POLLINGLOCATION": null,
"LID": "6002",
"Symbol": "A"
},
"geometry": {
"rings": [
[
[
-83,
40
],
[
-83,
40
],
[
-83,
40
],
[
-83,
40
]
]
]
}
},
  • Thanks for the link - but why do the rings have the same lat/longs -> -83, 40? The entire array is just showing [-83, 40]? Is this a bug? All the precision is also lost in the response. – vgoklani May 23 '19 at 22:38
  • mostly likely your geometry is need to be in decimal degrees to intersect – Mapperz May 24 '19 at 14:55

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