Hi Jena-Marc,

The namespace <http://geovocab.org/spatial#> is for NeoGeo Spatial ontology, which has similarities to GeoSPARQL specification but is not fully compliant.

The Apache Jena spatial property functions use <http://jena.apache.org/spatial#>. These are additional functions that extend the GeoSPARQL standard.

So you are likely getting no result as the "spatial:withinBox" function in the query is undefined.

Regarding your other question about GML and GeoJSON documents. The GeoSPARQL standard doesn't cover serialisation from or to geospatial document formats into the GeoSPARQL "Feature/Geometry/GeometryLiteral" structure. This is likely because it is expected that most use cases would stay in RDF format once setup. From my experience the GML standards are also unbelievably convoluted to fully support.

It may be straight forward to convert a list of points to a minimum GML document that QGIS accepts.

The "convert" functions are to harmonise a dataset to a single SRS and datatype to reduce overhead and confusion from switching between different formats when querying the data. Or to switch a dataset from one SRS or datatype to another, i.e. consolidating diverse data sources. They aren't for generating non-RDF spatial documents. These are also for GeoSPARQL structure datasets so a dataset using the LatLon geo predicates would need to be converted (for which the "convertGeoPredicates" might be useful).

Hope this helps,

Greg


On 26/10/2020 14:17, Jean-Marc Vanel wrote:
I missed ApacheCon, and I need some concrete hints sooner than next year.

Currently my database gives an empty answer to :
PREFIX spatial: <http://geovocab.org/spatial#>
# ?feature spatial:withinBox(?latMin ?lonMin ?latMax ?lonMax [ ?limit])
SELECT * WHERE {
   ?feature spatial:withinBox( 43.0 0.0 46.0 10.0 100 )
} LIMIT 100

Should I apply once for all GeoSPARQLOperations.convert() ?
static Dataset
<https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/Dataset.html?is-external=true>
convert
<https://jena.apache.org/documentation/javadoc/geosparql/org/apache/jena/geosparql/configuration/GeoSPARQLOperations.html#convert-org.apache.jena.query.Dataset->
(Dataset
<https://jena.apache.org/documentation/javadoc/arq/org/apache/jena/query/Dataset.html?is-external=true>
  dataset)
Convert the input dataset to the most frequent coordinate reference system
and default datatype.

Jean-Marc Vanel
<http://semantic-forms.cc:9112/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me>
+33
(0)6 89 16 29 52


Le lun. 26 oct. 2020 à 11:02, Marco Neumann <[email protected]> a
écrit :

good questions Jean-Marc, I will organize a session early in the new year
to address some of them. In your case geo:lat and geo:long are not part of
OGC GeoSPARQL but require a transformation. We have a tool in place for
that in Jena. And yes displaying large datasets need dedicated strategies
for efficient processing. The points raised by you would make a good
problem statement for our session next year. Not sure if you have attended
the ApachCon 2020 GeoSPARQL session last month but it's where I
mentioned further collaboration with third party tool developers as a
possibility. stay tuned.

Marco


On Mon, Oct 26, 2020 at 9:14 AM Jean-Marc Vanel <[email protected]>
wrote:

After reading the official
https://jena.apache.org/documentation/geosparql/
I'm puzzled as to concrete how to .

My simple export use case

    - I have a TDB 1 database with geo:lat and long properties; the Jena
    geosparql dependency is added to my application
    - I have a LeafLet viewer able to display any RDF document with
geo:lat
    and long properties ; example map
    <

https://semantic-forms.cc:1953/assets/geo-map/geo-map.html?link-prefix=http://semantic-forms.cc:1953/display?displayuri=&lang=fr&url=https://semantic-forms.cc:1953/sparql?query=%0APREFIX+form%3A+%3Chttp%3A%2F%2Fraw.githubusercontent.com%2Fjmvanel%2Fsemantic_forms%2Fmaster%2Fvocabulary%2Fforms.owl.ttl%23%3E+%0APREFIX+rdfs%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2000%2F01%2Frdf-schema%23%3E+%0APREFIX+geo%3A+%3Chttp%3A%2F%2Fwww.w3.org%2F2003%2F01%2Fgeo%2Fwgs84_pos%23%3E+%0APREFIX+foaf%3A+%3Chttp%3A%2F%2Fxmlns.com%2Ffoaf%2F0.1%2F%3E+%0A%0ACONSTRUCT+%7B%0A++%3Fthing+geo%3Along+%3FLONG+.%0A++%3Fthing+geo%3Alat+%3FLAT+.%0A++%3Fthing+rdfs%3Alabel+%3FLAB+.%0A++%3Fthing+foaf%3Adepiction+%3FIMG+.%0A%7D+WHERE+%7B%0A++graph+%3Fg+%7B%0A++++%3Fthing+%3Chttp%3A%2F%2Fpurl.org%2FNET%2Fc4dm%2Fevent.owl%23produced_in%3E+%3Chttp%3A%2F%2Fsemantic-forms.cc%3A1952%2Fldp%2FCormoz%3E+.%0A++%7D%0A++graph+%3Fgcoord+%7B%0A++++%3Fthing+geo%3Along+%3FLONG+.%0A++++%3Fthing+geo%3Alat+%3FLAT+.%0A++%7D%0A++OPTIONAL+%7B%0A+++graph+%3Fg1+%7B%0A++++%3Fthing+rdfs%3Alabel+%3FLAB+%7D+%7D%0A++OPTIONAL+%7B%0A+++graph+%3Fg2+%7B%0A++++%3Fthing+%3Curn%3AdisplayLabel%3E+%3FLAB+%7D+%7D%0A%0A++OPTIONAL+%7B%0A+++graph+%3Fg3+%7B%0A++++%3Fthing+foaf%3Adepiction+%3FIMG+%7D+%7D%0A++OPTIONAL+%7B%0A+++graph+%3Fg4+%7B%0A++++%3Fthing+foaf%3Aimg+%3FIMG+%7D+%7D%0A%0A++++OPTIONAL+%7B%0A+++graph+%3FgrCount+%7B%0A++++%3Fthing+form%3AlinksCount+%3FCOUNT.%0A++%7D+%7D%0A%7D%0AORDER+BY+DESC%28%3FCOUNT%29%0A
    ; but I found that JavaScript based displayers are falling on their
knees
    (becoming very slow) for thousands of points
    - so I plan to use QGIS, so I need an export from RDF to one of the
    formats QGIS supports: GML, GeoJSON , etc

How can I do that ?
Do I have to use one of the convert* methods in


https://jena.apache.org/documentation/javadoc/geosparql/index.html?org/apache/jena/geosparql/configuration/GeoSPARQLOperations.html
?

Jean-Marc Vanel
<

http://semantic-forms.cc:1952/display?displayuri=http://jmvanel.free.fr/jmv.rdf%23me
+33 (0)6 89 16 29 52
Twitter: @jmvanel , @jmvanel_fr ; chat: irc://irc.freenode.net#eulergui
  Chroniques jardin
<

http://semantic-forms.cc:1952/history?uri=http%3A%2F%2Fdbpedia.org%2Fresource%2FChronicle

--


---
Marco Neumann
KONA

Reply via email to