Informatievlaanderen / OSLOthema-mobiliteitDienstregelingEnPlanning

5 stars 1 forks source link

geometry #15

Closed Slusep closed 8 months ago

Slusep commented 1 year ago

http://www.w3.org/ns/locn#Geometry

Description Shape and position characteristics of an object. Usage Describes these features using points, lines, polygons, and coordinates. Properties we have defined the following properties for this datatype: gml, wkt.

-) Shoudn't we want to support geojson as well?

bertvannuffelen commented 1 year ago

geoJson is a tricky beast. It means that the CRS is wgs:84. Because in Flanders/Belgium official geo-polygons are expressed as lambert72 or lambert2008, the use of geoJSON is limited. In that case GeoJSON is not the master data. GML and WKT are representations that can encode the master data.

Slusep commented 1 year ago

I'm confused. We need a standard that is interoperable so is WGS84. Lambert 72 would need re-conversion before usage that's why I think that GeoJson should be supported.

GeertThijs commented 9 months ago

You do not need to convert your data. The model does not impose any Coordinate Reference System (CRS) unlike GeoJSON does. In stead it requires you to specify the CRS that is used, in the case of WGS84 that would look like this (example of a Point geometry):

{
    "@type": "http://www.opengis.net/ont/sf#Point",
    "http://www.opengis.net/ont/geosparql#asGML": {
        "@value": "<gml:Point srsName="http://www.opengis.net/def/crs/EPSG/0/4326">
                           <gml:coordinates>51.2178744,3.229362</gml:coordinates><gml:Point>",
        "@type": "http://www.opengis.net/ont/geosparql#gmlliteral"
    }
}

Comments:

By the way, the GeoJSON of the example above would look like this, not so very different:

{
    "@type": "https://purl.org/geojson/vocab#Feature",
    "https://purl.org/geojson/vocab#geometry": {
        "@type": "https://purl.org/geojson/vocab#geometry:Point",
        "https://purl.org/geojson/vocab#geometry:coordinates": [
            51.2178744,
            3.229362
        ]
    }
}
Slusep commented 8 months ago

the latest spécifications for GML https://datatracker.ietf.org/doc/html/rfc7946 especially the CRS section https://datatracker.ietf.org/doc/html/rfc7946#page-12 and the following note (copied from the document ) _

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.

_

indicates that indeed CRS is not supported anymore. It seems to me a sufficient reason to accept your note and reject my comment. Closing the issue