opengeospatial / ogc-geosparql

Public Repository for the OGC GeoSPARQL Standards Working Group
71 stars 19 forks source link

GeoJSON and GeoSPARQL and differing SRS's #451

Closed redmer closed 7 months ago

redmer commented 7 months ago

It's great to see that GeoJSON can be serialized into GeoSPARQL with v1.1, ideal for less-geo-aware consuming applications.

As GeoJSON is always (§ A.3.4.2) in WGS 84, I'd like to check my understanding of the specification.

  1. My personal learnings from #131 and the last sentence in § 6.4.2: a geo:Geometry is in only one single SRS.
  2. Per the example § C.1.2.4: a Geometry may be represented using multiple serializations.

I think that means (for rdf-geopackage) that:

  1. If a feature's geometry is serialized with geo:asGeoJSON and in WGS 84 with geo:asWKT, then the geo:Feature may have just a single geo:Geometry having two serializations.
  2. If a feature's geometry is serialized with geo:asGeoJSON and in EPSG:28992 (or any other SRS different from WGS 84) with geo:asWKT, then the geo:Feature must have two different geo:Geometrys, one per serialization.
situx commented 7 months ago

I would not say that this is implied necessarily.

Since the GeoJSON literal can only be in one CRS, I believe there is nothing stopping you from adding the GeoJSON literal when other literals are in a different SRS. I believe we also have no SHACL shape marking this as false. However, I think we would recommend to separate geo:Geometries assigned to Features by SRS. The difference here is that implementers should know that the GeoJSON literal is WGS84 by default and they would need to treat it as such under any circumstances.

But also for clarity in the knowledge graph it would be a plus to separate it into a WGS84 geometry and a Different-CRS geometry, also given that there will be the geo:inSRS property in the future.

@nicholascar @mperry455 do you see this the same way?

nicholascar commented 7 months ago

I agree with @situx here: implement separate geo:Geometry objects for the same geo:Feature, one using GeoJSON and the other using WKT or whatever.

redmer commented 7 months ago

Great! Thanks for explanation, that means that I'm doing the right thing in rdf-geopackage. Feel free to close.

situx commented 7 months ago

Then I will do just that. Closing...