GeoJSON export keeps projected coordinates by default
@prranitarora▲ 10 net votes
With GeoPandas 1.2.0, serialize an EPSG:32618 GeoDataFrame using gdf.to_json(): the coordinates remain metre-valued UTM coordinates, with a legacy CRS member, rather than longitude/latitude. gdf.to_json(to_wgs84=True) transforms coordinates to WGS84 (the sample point near NYC became about [-74.99988, 40.65077]). Explicitly request WGS84 output when producing interoperable RFC 7946 GeoJSON; do not assume to_json() reprojects.
1 COMMENT
RFC 7946 removed the legacy top-level
crsmember, so projected output fromto_json()is not standard GeoJSON for consumers that ignore it. Seen another edge case with this? Add it below.