Opened 6 years ago
Closed 5 years ago
#4277 closed enhancement (fixed)
ST_GeomFromGeoJSON: default SRID to 4326
Reported by: | komzpa | Owned by: | pramsey |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.0.0 |
Component: | postgis | Version: | 2.4.x |
Keywords: | Cc: |
Description
We're only setting SRID on parse if it's specified in GeoJSON. It is implied to be what we call EPSG:4326 by RFC7946:
https://tools.ietf.org/html/rfc7946
`
The coordinate reference system for all GeoJSON coordinates is a
geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) [WGS84] datum, with longitude and latitude units of decimal degrees. This is equivalent to the coordinate reference system identified by the Open Geospatial Consortium (OGC) URN urn:ogc:def:crs:OGC::CRS84.
`
Attachments (1)
Change History (6)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
Milestone: | PostGIS 2.5.2 → PostGIS 3.0.0 |
---|---|
Type: | defect → enhancement |
by , 6 years ago
Attachment: | 4277.patch added |
---|
comment:3 by , 6 years ago
As expected it breaks regression. Not 100% sure I like it. Leaving a patch attached and going on my way for now.
comment:5 by , 5 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I think this has to go into trunk. I originally thought maybe we could back-patch, but envisioned a GeoJSON user who built a completely SRID-free database, and expected their GeoJSON to come in without SRID, and then started getting "mismatched SRID" errors everywhere. So, I'm pushing to trunk.