Opened 9 years ago

Closed 8 years ago

#25874 closed New feature (fixed)

allow GEOSGeometry to read SRID from GeoJSON input

Reported by: Sergey Fedoseev Owned by: Sergey Fedoseev
Component: GIS Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description


Change History (6)

comment:1 by Sergey Fedoseev, 9 years ago

Owner: changed from nobody to Sergey Fedoseev
Status: newassigned

comment:2 by Tim Graham, 9 years ago

Triage Stage: UnreviewedAccepted

comment:3 by Claude Paroz, 8 years ago

Version: 1.9master

The GeoJSON format has been recently standardized in RFC 7946. In that standard, the use of the WGS84 coordinate system is mandatory.

Quoting RFC 7946:

4.  Coordinate Reference System

   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.  An OPTIONAL third-position element SHALL
   be the height in meters above or below the WGS 84 reference
   ellipsoid.  In the absence of elevation values, applications
   sensitive to height or depth SHOULD interpret positions as being at
   local ground or sea level.

   Note: the use of alternative coordinate reference systems was
   specified in [GJ2008], but it has been removed from this version of
   the specification because the use of different coordinate reference
   systems -- especially in the manner specified in [GJ2008] -- has
   proven to have interoperability issues.  In general, GeoJSON
   processing software is not expected to have access to coordinate
   reference system databases or to have network access to coordinate
   reference system transformation parameters.  However, where all
   involved parties have a prior arrangement, alternative coordinate
   reference systems can be used without risk of data being
   misinterpreted.

Therefore, I suggest to won't fix this ticket. Any comment?

comment:4 by Sergey Fedoseev, 8 years ago

If CRS is specified in GeoJSON that means it's in pre-RFC format. I don't think it's sane to set SRID to 4326, if some other SRID is specified.
The implementation of this feature is quite easy: GDAL sets SRID from GeoJSON but we simply lose it when OGR is conveted to GEOS.

comment:5 by Sergey Fedoseev, 8 years ago

Has patch: set
Version 0, edited 8 years ago by Sergey Fedoseev (next)

comment:6 by Tim Graham <timograham@…>, 8 years ago

Resolution: fixed
Status: assignedclosed

In 24023c6:

Fixed #25874 -- Made GEOSGeometry read SRID from GeoJSON input.

Note: See TracTickets for help on using tickets.
Back to Top