Re: Content negotiation of spatial linked data

Hi Andrea,

I’m not sure one has to choose. Sdwgeo geometries are intended to have URI’s and can be requested along with features or separately in a SPARQL request. Particular serializations of both the feature and geometry data can be negotiated either way, I think. If one request a feature with contentType application/rdf+xml; geomdata=“WKTLiteral”, then the geometry if requested / returned should include an  asWKT. If it isn’t returned, then no harm done, and a further request can be made on one or more of the geometry properties of the feature, requesting the same contentType.

So I think this will work as long as providers of linked spatial data support it and we agree the best practice is to use this ontology or at least the serialization part of it for spatial data in RDF. 

It is another, but also significant issue how a linked spatial data API should work — whether it should have a provision for returning features with or without geometries when one makes a request to the feature URL.

Josh

> On Jul 20, 2016, at 12:44 PM, Andrea Perego <andrea.perego@jrc.ec.europa.eu> wrote:
> 
> On 20/07/2016 17:54, Joshua Lieberman wrote:
>> I’ve added a comment to the wiki about geometry serialization negotiation:
>> 
>> https://www.w3.org/2015/spatial/wiki/Further_development_of_GeoSPARQL#Negotiate_geometry_serializations
>> 
>> It seems the best idea may be to define a content type parameter for the
>> available / desired serialization, but that would presumably need to be
>> added to a linked spatial data API best practice.
> 
> Thanks, Josh. I wonder whether this is another case where profile-based content negotiation can play a role.
> 
> On the other hand, there might be an alternative solution to deal with this issue, e.g., by using URIs for geometries. In such a case, you fetch the RDF, and then apply content negotiation on the geometry URI to get WKT, GML, KML, GeoJSON, etc. So, basically, you get to the geometry in two steps.
> 
> This relates to the WG discussion on "geometries as first-class citizens", and count some implementations - as those I outlined in an earlier email [1]. It may be worth assessing them wrt to the general issue of serving spatial (linked) data in multiple formats.
> 
> Cheers,
> 
> Andrea
> 
> ----
> [1]https://lists.w3.org/Archives/Public/public-sdw-wg/2016May/0099.html
> 
>> 
>> —Josh
> 

Received on Wednesday, 20 July 2016 17:00:11 UTC