0

I have taken a shapefile from this page and I converted it to a GeoJSON file using Python and Geopandas like this:

import geopandas as gpd
file = gpd.read_file("file.shp")
file.to_file("file.json", driver="GeoJSON")

Here's an example line from the GeoJSON:

{ "type": "Feature", "properties": { "ID": "DE63F0FA-CD3A-41A6-9524-C9C017A8DA64", "FEATCODE": 15014, "SQM": 148.245050005 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 385615.56, 249868.31000000029, 0.0 ], [ 385605.58, 249865.36, 0.0 ], [ 385601.55, 249879.03, 0.0 ], [ 385611.53, 249881.97, 0.0 ], [ 385615.56, 249868.31000000029, 0.0 ] ] ] } }

The coordinates clearly aren't lat/longs. In addition there's an extraneous 0 in each set of coordinates.

What format is this? How can I convert it to a lat/long?

Thanks in advance.

Ian Newson
  • 7,679
  • 2
  • 47
  • 80

1 Answers1

1

It turns out this coordinate system is OSGB36.

I am currently using proj4 to convert the data to WGS84.

Ian Newson
  • 7,679
  • 2
  • 47
  • 80
  • @MichaelEntin interesting. I'm surprised geopandas didn't reproject itself during the conversion given that geojson is supposed to use wgs84. – Ian Newson Jun 29 '19 at 06:38
  • I had the same issue before. They indeed should reproject and give users a warning I think. – steven Jun 29 '19 at 13:51