0

As far as I can tell, the GeoJSON standard doesn't support the M-dimension of linear referencing lines.

For example, Oracle Spatial doesn't support LRS lines when using the SDO_UTIL.TO_GEOJSON() function:

select  
 SDO_UTIL.TO_GEOJSON(SDO_LRS.CONVERT_TO_LRS_GEOM(sdo_geometry('LINESTRING(1 2,3 4)'))) as shape
from
 dual

ORA-13199: LRS is not supported

The Oracle Spatial developers say:

"My guess is that LRS is not part of the GeoJSON standard(RFC 7946)."

SDO_UTIL.TO_GEOJSON() - Support LRS geometries


I want to request that the GeoJSON standard be enhanced to support LRS lines. How can go about making that request?

1

2 Answers 2

2

It sounds like they've already considered it, and decided against it:

The GeoJSON Format (https://datatracker.ietf.org/doc/html/rfc7946)

Implementations SHOULD NOT extend positions beyond three elements because the semantics of extra elements are unspecified and ambiguous. Historically, some implementations have used a fourth element to carry a linear referencing measure (sometimes denoted as "M") or a numerical timestamp, but in most situations a parser will not be able to properly interpret these values. The interpretation and meaning of additional elements is beyond the scope of this specification, and additional elements MAY be ignored by parsers.

2
  • 2
    I don't really understand that argument. Even if extra coordinates have unspecified semantics, then so do properties, which can be anything, yet are allowed in GeoJSON, as well as extra items in the JSON at the top level. And why can't a parser "not be able to interpret" a numerical value? Its a number. Parse it, and pass it on...I understand why GeoJSON tries to be simple but its too simple for many applications ("CRS 4326 only" for example). The real answer here is therefore "use another file format"
    – Spacedman
    May 13 at 21:10
  • @Spacedman FYI, although you might already be aware: "OGC Features and Geometries JSON will: include the ability to use Coordinate Reference Systems (CRSs) other than WGS84." GitHub - OGC Features and Geometries JSON.
    – User1974
    May 20 at 5:10
1

Enhancements to geospatial JSON format will likely happen through the "OGC Features and Geometries JSON" https://github.com/opengeospatial/ogc-feat-geo-json. The new standard is in a draft phase now. It defines 3d geometries https://docs.ogc.org/DRAFTS/21-045.html#rc_3d but not yet measures.

You can request support for M coordinates in "place" object by creating an issue in the GitHub repository https://github.com/opengeospatial/ogc-feat-geo-json/issues

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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