Apache Jena
  1. Apache Jena
  2. JENA-10

GeoARQ: a geo location property function for ARQ

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: Jena 2.11.0
    • Component/s: ARQ
    • Labels:

      Description

      Similarly to LARQ, we can use Lucene spatial capabilities to provide a geo/spatial property function for ARQ.

      An initial and experimental implementation as proof of concept is available here: https://github.com/castagna/GeoARQ

      The initial implementation can provide:

      • ?s geoarq:nearby ( lat long ) // lat and long are in WGS 84, results are sorted by some "unspecified" score
      • ?s geoarq:nearby ( lat long dist ) // restrict withing dist km from (lat,long)
      • (?s ?d) geoarq:nearby ( lat long ) // results are sorted by distance (?d) which is made available to the user
      • (?s ?d) geoarq:nearby ( lat long dist )
      • ?s geoarq:within ( lat1, long1, lat2, long2 )

      GeoARQ would be better as a separate module from ARQ (same as LARQ).

        Activity

        Andy Seaborne made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Assignee Ying Jiang [ jpz6311whu ]
        Andy Seaborne made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s Jena 2.11.0 [ 12324437 ]
        Resolution Fixed [ 1 ]
        Hide
        Andy Seaborne added a comment -

        See jena-spatial

        Show
        Andy Seaborne added a comment - See jena-spatial
        Hide
        Andy Seaborne added a comment -

        GSoC project description:

        Not all spatial queries are complicated. Many use case are covered by provision of a single facility like get all objects within a given radius or within a given bounding box. GeoSPARQL which is a complete approach to geospatial query but it is complicated and driected more towards the specialist, not the average linked data developer with SPARQL knowledge.

        This project is to provide a one or two basic geospatial query functions.

        Example: return places within 10 kilometers of Bristol UK (which as latitude/longitude of 51.46,2.6).

        SELECT ?placeName

        { ?place spatial:query (51.46 2.6 10) . ?place rdfs:label ?placeName }

        We have a similar property function architecture in jena-text [0] so this project is to take that concept and apply it to geospatial information.

        Lucene spatial could be used for the spatial index. There is a simple vocabulary for expressing WGS80 information [1]; there is also the point information in WKT [2].

        This project is not primarily about geospatial processing; it is concerned with the indexing and querying simple, existing geospatial data and integration with Fuseki.

        [0] http://jena.staging.apache.org/documentation/query/text-query.html
        [1] http://www.w3.org/2003/01/geo/
        [2] http://en.wikipedia.org/wiki/Well-known_text

        Show
        Andy Seaborne added a comment - GSoC project description: Not all spatial queries are complicated. Many use case are covered by provision of a single facility like get all objects within a given radius or within a given bounding box. GeoSPARQL which is a complete approach to geospatial query but it is complicated and driected more towards the specialist, not the average linked data developer with SPARQL knowledge. This project is to provide a one or two basic geospatial query functions. Example: return places within 10 kilometers of Bristol UK (which as latitude/longitude of 51.46,2.6). SELECT ?placeName { ?place spatial:query (51.46 2.6 10) . ?place rdfs:label ?placeName } We have a similar property function architecture in jena-text [0] so this project is to take that concept and apply it to geospatial information. Lucene spatial could be used for the spatial index. There is a simple vocabulary for expressing WGS80 information [1] ; there is also the point information in WKT [2] . This project is not primarily about geospatial processing; it is concerned with the indexing and querying simple, existing geospatial data and integration with Fuseki. [0] http://jena.staging.apache.org/documentation/query/text-query.html [1] http://www.w3.org/2003/01/geo/ [2] http://en.wikipedia.org/wiki/Well-known_text
        Rob Vesse made changes -
        Field Original Value New Value
        Labels gsoc2013
        Hide
        Paolo Castagna added a comment -

        See also Apache SIS: http://incubator.apache.org/sis/

        Show
        Paolo Castagna added a comment - See also Apache SIS: http://incubator.apache.org/sis/
        Hide
        Laurent Pellegrino added a comment - - edited

        > geospatialweb is itself LGPL and it uses spatialindex which is LGPL too

        Holy cow, It's a great shame

        > should we be doing this with property functions or with FILTER functions?

        They have just added support for geo-spatial indexing in OWLIM (http://www.ontotext.com/owlim/geo-spatial) and they also do it by using property functions. I think it's a good idea to use property functions because it is more obvious that you are applying a specific behavior when you write your query.

        To deal with geo-spatial data, I think it would be nice to create a particular index that use a r-tree.

        Show
        Laurent Pellegrino added a comment - - edited > geospatialweb is itself LGPL and it uses spatialindex which is LGPL too Holy cow, It's a great shame > should we be doing this with property functions or with FILTER functions? They have just added support for geo-spatial indexing in OWLIM ( http://www.ontotext.com/owlim/geo-spatial ) and they also do it by using property functions. I think it's a good idea to use property functions because it is more obvious that you are applying a specific behavior when you write your query. To deal with geo-spatial data, I think it would be nice to create a particular index that use a r-tree.
        Hide
        Paolo Castagna added a comment -

        > I am also interested by this feature.

        Great.

        > There is a similar but older project

        Geospatialweb is great and even better than the GeoARQ quick hack.
        However, geospatialweb is itself LGPL and it uses spatialindex which is LGPL too:
        http://svn.gispython.org/spatialindex/spatialindex/trunk/COPYING

        Also, should we be doing this with property functions or with FILTER functions?

        Other issues or things to think about are: avoiding duplicates in your index, supporting deletions and with lat/long the fact that it's not possible to index one triple at the time... even if you can expect the triples will be close to each others.

        Show
        Paolo Castagna added a comment - > I am also interested by this feature. Great. > There is a similar but older project Geospatialweb is great and even better than the GeoARQ quick hack. However, geospatialweb is itself LGPL and it uses spatialindex which is LGPL too: http://svn.gispython.org/spatialindex/spatialindex/trunk/COPYING Also, should we be doing this with property functions or with FILTER functions? Other issues or things to think about are: avoiding duplicates in your index, supporting deletions and with lat/long the fact that it's not possible to index one triple at the time... even if you can expect the triples will be close to each others.
        Hide
        Laurent Pellegrino added a comment - - edited

        I am also interested by this feature. Geo-spatial data are more and more popular and users need to have the possibility to deal with.

        There is a similar but older project which is available here:
        http://code.google.com/p/geospatialweb/

        Show
        Laurent Pellegrino added a comment - - edited I am also interested by this feature. Geo-spatial data are more and more popular and users need to have the possibility to deal with. There is a similar but older project which is available here: http://code.google.com/p/geospatialweb/
        Paolo Castagna created issue -

          People

          • Assignee:
            Ying Jiang
            Reporter:
            Paolo Castagna
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development