Skip to main content
Question

Can GeoJSON format handle M-values?

  • November 6, 2020
  • 4 replies
  • 120 views

Forum|alt.badge.img

Hi,

I need a text based format that can handle measures values for futher treatment in QGIS. Can GeoJSON suitable for this? I currently does not manage to keep the M-values using GeoJSON as Output port and I currently can't determine if I miss some configuration option or if the format does not handle M-values at all.

If GeoJSON is not the answer, what file format could I use? I need to handle custom CRS as well (EPSG:2154).

Thanks for your help!

4 replies

david_r
Celebrity
  • November 6, 2020

The GeoJSON standard discourages M-values:

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.

The term "three elements" refer to the X, Y and (optional) Z values for each coordinate.

Source: https://tools.ietf.org/html/rfc7946#section-3.1.1

Other coordinate systems than WGS84 are also not allowed in the current version of the standard:

The coordinate reference system for all GeoJSON coordinates is a geographic coordinate reference system, using the World Geodetic System 1984 (WGS 84) datum, with longitude and latitude units of decimal degrees.

Source: https://tools.ietf.org/html/rfc7946#section-4


Forum|alt.badge.img
  • Author
  • November 6, 2020

Hi,

Thanks for your answer.

What format could I use for storage which would not be ESRI-owned then?


david_r
Celebrity
  • November 9, 2020
jportemer wrote:

Hi,

Thanks for your answer.

What format could I use for storage which would not be ESRI-owned then?

GML, maybe?

https://www.ogc.org/standards/gml/


Forum|alt.badge.img
  • Author
  • November 16, 2020
david_r wrote:

Thanks, that could be it.

Are you sure that format can store M-values?

I cannot see them on output files and I did not see yet any reference on the standard you provided.

Or maybe I miss a setting in FME?


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings