You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by Alexander Dutton <al...@oucs.ox.ac.uk> on 2011/09/13 13:42:48 UTC

Jena and PostGIS (à la LARQ)

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

We've currently got a lot of (simple) geospatial data in
<http://data.clarosnet.org/> (served behind the scenes by Fuseki).

We'd like to do some geospatial indexing magic, and were wondering
about writing something a bit like LARQ that will pull out things like
geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
then implements something like GeoSPARQL (<http://geosparql.org/>).

Has anyone started doing this or something similar? I'm happy to give
it a go and I'm sure my employer would be happy to contribute it back
to Jena and the ASF. My plan was to go through the LARQ codebase to
work out how it hooks itself in, and use that as a model.

Yours,

Alex

- -- 
Alexander Dutton
Metamorphoses Project Developer, Claros
Oxford University Computing Services, ℡ 01865 (6)13483
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
=r1dj
-----END PGP SIGNATURE-----


Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
very nice!

On Tue, Sep 13, 2011 at 11:46 AM, Rob Battle <rb...@bbn.com> wrote:
> It is open sourced under the BSD License
> On Sep 13, 2011, at 11:43 AM, Marco Neumann wrote:
>
>> what's your license model for Parliament?
>>
>>
>> On Tue, Sep 13, 2011 at 11:37 AM, Rob Battle <rb...@bbn.com> wrote:
>>> Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.
>>>
>>>
>>> -rob
>>>
>>> On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:
>>>
>>>> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
>>>> year and Parliament looks indeed great, it already uses PostGIS for
>>>> the spatial queries. I am not sure how Parliament relates to the Jena
>>>> API though.
>>>>
>>>> [1] http://www.vimeo.com/23850413
>>>>
>>>>
>>>> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>>>>> Hi,
>>>>>
>>>>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>>>>>
>>>>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>>>>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>>>>>
>>>>> The Parliament geosparql branch is located at [6]
>>>>>
>>>>> -rob
>>>>>
>>>>> [1] http://parliament.semwebcentral.org
>>>>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>>>>> [3] http://www.w3.org/TR/owl-time/
>>>>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>>>>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>>>>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>>>>>
>>>>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>>>>>
>>>>>> There is also Parliament [1] which offers both geospatial and temporal
>>>>>> indexing graphs.
>>>>>>
>>>>>> Dave
>>>>>>
>>>>>> [1] http://parliament.semwebcentral.org/
>>>>>>
>>>>>>
>>>>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>>>>> Hi Alex,
>>>>>>> great to hear that, you are welcome.
>>>>>>>
>>>>>>> Something similar using Lucene Spatial capabilities instead of
>>>>>>> a proper GIS is here (it's just a less than two days hack):
>>>>>>> https://github.com/castagna/GeoARQ
>>>>>>>
>>>>>>> I was planning to post something along the lines of "making
>>>>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>>>>> not a good idea (yet).
>>>>>>>
>>>>>>> It would be good to enable third parties to add their own property
>>>>>>> functions (that's possible) which use custom indexes and need to
>>>>>>> update those indexes as triples/quads are added/removed to the
>>>>>>> underlying RDF store.
>>>>>>>
>>>>>>> More on this later, in the meantime: welcome.
>>>>>>>
>>>>>>> Paolo
>>>>>>>
>>>>>>> Alexander Dutton wrote:
>>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>>>> Hash: SHA1
>>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> We've currently got a lot of (simple) geospatial data in
>>>>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>>>>>
>>>>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>>>>> about writing something a bit like LARQ that will pull out things like
>>>>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>>>>>
>>>>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>>>>> work out how it hooks itself in, and use that as a model.
>>>>>>>>
>>>>>>>> Yours,
>>>>>>>>
>>>>>>>> Alex
>>>>>>>>
>>>>>>>> - --
>>>>>>>> Alexander Dutton
>>>>>>>> Metamorphoses Project Developer, Claros
>>>>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>>>>>
>>>>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>>>>> =r1dj
>>>>>>>> -----END PGP SIGNATURE-----
>>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> Marco Neumann
>>>> KONA
>>>>
>>>> ---
>>>> Join us at the Semantic Web Media Summit in New York City for an
>>>> exciting event on 14 September 2011
>>>> http://www.lotico.com/evt/swmsNYC2011/
>>>
>>>
>>
>>
>>
>> --
>> Marco Neumann
>> KONA
>>
>> ---
>> Join us at the Semantic Web Media Summit in New York City for an
>> exciting event on 14 September 2011
>> http://www.lotico.com/evt/swmsNYC2011/
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Rob Battle <rb...@bbn.com>.
For geospatial, Parliament depends on:

Geotools (http://www.geotools.org): LGPL 
Geotools depends on the JTS topology suit (http://www.vividsolutions.com/jts) which is LGPL

Optional dependencies
deegree r-tree library (http://www.deegree.org) (LGPL)
For PostgreSQL, Parliament only depends on the BSD PostgreSQL jdbc driver.  The Parliament PostgreSQL integration does not need to use the GPLd PostGIS jdbc driver and does not depend on any of the datatypes provided by it.  The queries Parliament uses are standard simple features queries.

The indexing is configurable to support either PostgreSQL or deegree's r-tree as a persistent index or JTS as an in memory index.  In an ideal world, I'd prefer to have our own persistent r-tree implementation instead of depending on one of those however.

It would be fairly easy to extract the geospatial functionality as it is encapsulated in a few classes and the property function factory, however there are some quirks that are specific to how Parliament works, especially in the query execution and optimization pieces.  For instance, we subclass the PropertyFunction class to create an IndexPropertyFunction that contains a reference to the index.  We also created our own query algebra operand that handles the IndexPropertyFunction in order to potentially optimize any dependent sub graph patterns (Parliament keeps track of some simple statistics that can suggest when it may be quicker to bind triples in the kb first and then check to see if they match some spatial extent instead of always going to the index).  Another implementation detail is that Parliament provides named graph support as a collection of triple stores (instead of as a quad store).   As such, an index is provided at the graph level.  This means that at query time, Parliament needs to figure out which index is going to be queried in order to optimize the query, and then when the property function is executed, it needs to get the index and use that to perform the operation and return the appropriate query iterator.  I'm sure there may be other potential issues as well, but we have used the indexes on standard Jena in-memory models with no problem.

In creating the GeoSPARQL branch, we cleaned up a lot of the code so I would look at that if you are interested in seeing how we implemented it.

-rob

On Sep 13, 2011, at 12:28 PM, Paolo Castagna wrote:

> Rob Battle wrote:
>> It is open sourced under the BSD License
> 
> Hi Rob,
> do you have a list of Parliament dependencies (in relation to the geospatial
> capabilities) and their licenses?
> 
> Would it be easy/possible to extract the geospatial functionalities only and
> use them with, say, TDB datasets?
> 
> I have not looked at the sources yet, sorry.
> 
> Paolo
> 
>> On Sep 13, 2011, at 11:43 AM, Marco Neumann wrote:
>>> what's your license model for Parliament?
>>> 
>>> 
>>> On Tue, Sep 13, 2011 at 11:37 AM, Rob Battle <rb...@bbn.com> wrote:
>>>> Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.
>>>> 
>>>> 
>>>> -rob
>>>> 
>>>> On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:
>>>> 
>>>>> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
>>>>> year and Parliament looks indeed great, it already uses PostGIS for
>>>>> the spatial queries. I am not sure how Parliament relates to the Jena
>>>>> API though.
>>>>> 
>>>>> [1] http://www.vimeo.com/23850413
>>>>> 
>>>>> 
>>>>> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>>>>>> Hi,
>>>>>> 
>>>>>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>>>>>> 
>>>>>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>>>>>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>>>>>> 
>>>>>> The Parliament geosparql branch is located at [6]
>>>>>> 
>>>>>> -rob
>>>>>> 
>>>>>> [1] http://parliament.semwebcentral.org
>>>>>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>>>>>> [3] http://www.w3.org/TR/owl-time/
>>>>>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>>>>>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>>>>>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>>>>>> 
>>>>>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>>>>>> 
>>>>>>> There is also Parliament [1] which offers both geospatial and temporal
>>>>>>> indexing graphs.
>>>>>>> 
>>>>>>> Dave
>>>>>>> 
>>>>>>> [1] http://parliament.semwebcentral.org/
>>>>>>> 
>>>>>>> 
>>>>>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>>>>>> Hi Alex,
>>>>>>>> great to hear that, you are welcome.
>>>>>>>> 
>>>>>>>> Something similar using Lucene Spatial capabilities instead of
>>>>>>>> a proper GIS is here (it's just a less than two days hack):
>>>>>>>> https://github.com/castagna/GeoARQ
>>>>>>>> 
>>>>>>>> I was planning to post something along the lines of "making
>>>>>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>>>>>> not a good idea (yet).
>>>>>>>> 
>>>>>>>> It would be good to enable third parties to add their own property
>>>>>>>> functions (that's possible) which use custom indexes and need to
>>>>>>>> update those indexes as triples/quads are added/removed to the
>>>>>>>> underlying RDF store.
>>>>>>>> 
>>>>>>>> More on this later, in the meantime: welcome.
>>>>>>>> 
>>>>>>>> Paolo
>>>>>>>> 
>>>>>>>> Alexander Dutton wrote:
>>>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>>>>> Hash: SHA1
>>>>>>>>> 
>>>>>>>>> Hi all,
>>>>>>>>> 
>>>>>>>>> We've currently got a lot of (simple) geospatial data in
>>>>>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>>>>>> 
>>>>>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>>>>>> about writing something a bit like LARQ that will pull out things like
>>>>>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>>>>>> 
>>>>>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>>>>>> work out how it hooks itself in, and use that as a model.
>>>>>>>>> 
>>>>>>>>> Yours,
>>>>>>>>> 
>>>>>>>>> Alex
>>>>>>>>> 
>>>>>>>>> - --
>>>>>>>>> Alexander Dutton
>>>>>>>>> Metamorphoses Project Developer, Claros
>>>>>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>>>>>> 
>>>>>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>>>>>> =r1dj
>>>>>>>>> -----END PGP SIGNATURE-----
>>>>>>>>> 
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Marco Neumann
>>>>> KONA
>>>>> 
>>>>> ---
>>>>> Join us at the Semantic Web Media Summit in New York City for an
>>>>> exciting event on 14 September 2011
>>>>> http://www.lotico.com/evt/swmsNYC2011/
>>>> 
>>> 
>>> 
>>> -- 
>>> Marco Neumann
>>> KONA
>>> 
>>> ---
>>> Join us at the Semantic Web Media Summit in New York City for an
>>> exciting event on 14 September 2011
>>> http://www.lotico.com/evt/swmsNYC2011/
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Rob Battle wrote:
> It is open sourced under the BSD License

Hi Rob,
do you have a list of Parliament dependencies (in relation to the geospatial
capabilities) and their licenses?

Would it be easy/possible to extract the geospatial functionalities only and
use them with, say, TDB datasets?

I have not looked at the sources yet, sorry.

Paolo

> On Sep 13, 2011, at 11:43 AM, Marco Neumann wrote:
> 
>> what's your license model for Parliament?
>>
>>
>> On Tue, Sep 13, 2011 at 11:37 AM, Rob Battle <rb...@bbn.com> wrote:
>>> Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.
>>>
>>>
>>> -rob
>>>
>>> On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:
>>>
>>>> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
>>>> year and Parliament looks indeed great, it already uses PostGIS for
>>>> the spatial queries. I am not sure how Parliament relates to the Jena
>>>> API though.
>>>>
>>>> [1] http://www.vimeo.com/23850413
>>>>
>>>>
>>>> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>>>>> Hi,
>>>>>
>>>>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>>>>>
>>>>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>>>>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>>>>>
>>>>> The Parliament geosparql branch is located at [6]
>>>>>
>>>>> -rob
>>>>>
>>>>> [1] http://parliament.semwebcentral.org
>>>>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>>>>> [3] http://www.w3.org/TR/owl-time/
>>>>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>>>>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>>>>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>>>>>
>>>>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>>>>>
>>>>>> There is also Parliament [1] which offers both geospatial and temporal
>>>>>> indexing graphs.
>>>>>>
>>>>>> Dave
>>>>>>
>>>>>> [1] http://parliament.semwebcentral.org/
>>>>>>
>>>>>>
>>>>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>>>>> Hi Alex,
>>>>>>> great to hear that, you are welcome.
>>>>>>>
>>>>>>> Something similar using Lucene Spatial capabilities instead of
>>>>>>> a proper GIS is here (it's just a less than two days hack):
>>>>>>> https://github.com/castagna/GeoARQ
>>>>>>>
>>>>>>> I was planning to post something along the lines of "making
>>>>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>>>>> not a good idea (yet).
>>>>>>>
>>>>>>> It would be good to enable third parties to add their own property
>>>>>>> functions (that's possible) which use custom indexes and need to
>>>>>>> update those indexes as triples/quads are added/removed to the
>>>>>>> underlying RDF store.
>>>>>>>
>>>>>>> More on this later, in the meantime: welcome.
>>>>>>>
>>>>>>> Paolo
>>>>>>>
>>>>>>> Alexander Dutton wrote:
>>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>>>> Hash: SHA1
>>>>>>>>
>>>>>>>> Hi all,
>>>>>>>>
>>>>>>>> We've currently got a lot of (simple) geospatial data in
>>>>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>>>>>
>>>>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>>>>> about writing something a bit like LARQ that will pull out things like
>>>>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>>>>>
>>>>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>>>>> work out how it hooks itself in, and use that as a model.
>>>>>>>>
>>>>>>>> Yours,
>>>>>>>>
>>>>>>>> Alex
>>>>>>>>
>>>>>>>> - --
>>>>>>>> Alexander Dutton
>>>>>>>> Metamorphoses Project Developer, Claros
>>>>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>>>>>
>>>>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>>>>> =r1dj
>>>>>>>> -----END PGP SIGNATURE-----
>>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> --
>>>> Marco Neumann
>>>> KONA
>>>>
>>>> ---
>>>> Join us at the Semantic Web Media Summit in New York City for an
>>>> exciting event on 14 September 2011
>>>> http://www.lotico.com/evt/swmsNYC2011/
>>>
>>
>>
>> -- 
>> Marco Neumann
>> KONA
>>
>> ---
>> Join us at the Semantic Web Media Summit in New York City for an
>> exciting event on 14 September 2011
>> http://www.lotico.com/evt/swmsNYC2011/
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Rob Battle <rb...@bbn.com>.
It is open sourced under the BSD License
On Sep 13, 2011, at 11:43 AM, Marco Neumann wrote:

> what's your license model for Parliament?
> 
> 
> On Tue, Sep 13, 2011 at 11:37 AM, Rob Battle <rb...@bbn.com> wrote:
>> Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.
>> 
>> 
>> -rob
>> 
>> On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:
>> 
>>> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
>>> year and Parliament looks indeed great, it already uses PostGIS for
>>> the spatial queries. I am not sure how Parliament relates to the Jena
>>> API though.
>>> 
>>> [1] http://www.vimeo.com/23850413
>>> 
>>> 
>>> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>>>> Hi,
>>>> 
>>>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>>>> 
>>>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>>>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>>>> 
>>>> The Parliament geosparql branch is located at [6]
>>>> 
>>>> -rob
>>>> 
>>>> [1] http://parliament.semwebcentral.org
>>>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>>>> [3] http://www.w3.org/TR/owl-time/
>>>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>>>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>>>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>>>> 
>>>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>>>> 
>>>>> There is also Parliament [1] which offers both geospatial and temporal
>>>>> indexing graphs.
>>>>> 
>>>>> Dave
>>>>> 
>>>>> [1] http://parliament.semwebcentral.org/
>>>>> 
>>>>> 
>>>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>>>> Hi Alex,
>>>>>> great to hear that, you are welcome.
>>>>>> 
>>>>>> Something similar using Lucene Spatial capabilities instead of
>>>>>> a proper GIS is here (it's just a less than two days hack):
>>>>>> https://github.com/castagna/GeoARQ
>>>>>> 
>>>>>> I was planning to post something along the lines of "making
>>>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>>>> not a good idea (yet).
>>>>>> 
>>>>>> It would be good to enable third parties to add their own property
>>>>>> functions (that's possible) which use custom indexes and need to
>>>>>> update those indexes as triples/quads are added/removed to the
>>>>>> underlying RDF store.
>>>>>> 
>>>>>> More on this later, in the meantime: welcome.
>>>>>> 
>>>>>> Paolo
>>>>>> 
>>>>>> Alexander Dutton wrote:
>>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>>> Hash: SHA1
>>>>>>> 
>>>>>>> Hi all,
>>>>>>> 
>>>>>>> We've currently got a lot of (simple) geospatial data in
>>>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>>>> 
>>>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>>>> about writing something a bit like LARQ that will pull out things like
>>>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>>>> 
>>>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>>>> work out how it hooks itself in, and use that as a model.
>>>>>>> 
>>>>>>> Yours,
>>>>>>> 
>>>>>>> Alex
>>>>>>> 
>>>>>>> - --
>>>>>>> Alexander Dutton
>>>>>>> Metamorphoses Project Developer, Claros
>>>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>>>> 
>>>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>>>> =r1dj
>>>>>>> -----END PGP SIGNATURE-----
>>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>> 
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Marco Neumann
>>> KONA
>>> 
>>> ---
>>> Join us at the Semantic Web Media Summit in New York City for an
>>> exciting event on 14 September 2011
>>> http://www.lotico.com/evt/swmsNYC2011/
>> 
>> 
> 
> 
> 
> -- 
> Marco Neumann
> KONA
> 
> ---
> Join us at the Semantic Web Media Summit in New York City for an
> exciting event on 14 September 2011
> http://www.lotico.com/evt/swmsNYC2011/


Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
what's your license model for Parliament?


On Tue, Sep 13, 2011 at 11:37 AM, Rob Battle <rb...@bbn.com> wrote:
> Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.
>
>
> -rob
>
> On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:
>
>> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
>> year and Parliament looks indeed great, it already uses PostGIS for
>> the spatial queries. I am not sure how Parliament relates to the Jena
>> API though.
>>
>> [1] http://www.vimeo.com/23850413
>>
>>
>> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>>> Hi,
>>>
>>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>>>
>>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>>>
>>> The Parliament geosparql branch is located at [6]
>>>
>>> -rob
>>>
>>> [1] http://parliament.semwebcentral.org
>>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>>> [3] http://www.w3.org/TR/owl-time/
>>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>>>
>>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>>>
>>>> There is also Parliament [1] which offers both geospatial and temporal
>>>> indexing graphs.
>>>>
>>>> Dave
>>>>
>>>> [1] http://parliament.semwebcentral.org/
>>>>
>>>>
>>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>>> Hi Alex,
>>>>> great to hear that, you are welcome.
>>>>>
>>>>> Something similar using Lucene Spatial capabilities instead of
>>>>> a proper GIS is here (it's just a less than two days hack):
>>>>> https://github.com/castagna/GeoARQ
>>>>>
>>>>> I was planning to post something along the lines of "making
>>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>>> not a good idea (yet).
>>>>>
>>>>> It would be good to enable third parties to add their own property
>>>>> functions (that's possible) which use custom indexes and need to
>>>>> update those indexes as triples/quads are added/removed to the
>>>>> underlying RDF store.
>>>>>
>>>>> More on this later, in the meantime: welcome.
>>>>>
>>>>> Paolo
>>>>>
>>>>> Alexander Dutton wrote:
>>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>>> Hash: SHA1
>>>>>>
>>>>>> Hi all,
>>>>>>
>>>>>> We've currently got a lot of (simple) geospatial data in
>>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>>>
>>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>>> about writing something a bit like LARQ that will pull out things like
>>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>>>
>>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>>> work out how it hooks itself in, and use that as a model.
>>>>>>
>>>>>> Yours,
>>>>>>
>>>>>> Alex
>>>>>>
>>>>>> - --
>>>>>> Alexander Dutton
>>>>>> Metamorphoses Project Developer, Claros
>>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>>> -----BEGIN PGP SIGNATURE-----
>>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>>>
>>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>>> =r1dj
>>>>>> -----END PGP SIGNATURE-----
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>>
>> --
>> Marco Neumann
>> KONA
>>
>> ---
>> Join us at the Semantic Web Media Summit in New York City for an
>> exciting event on 14 September 2011
>> http://www.lotico.com/evt/swmsNYC2011/
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Rob Battle <rb...@bbn.com>.
Parliament implements the Jena graph interface.  Query access to the indexes is provided via ARQ property functions.  Data is added to the indexes via a mechanism that wraps a Jena GraphListeners  In fact, our indexes should be work on non-Parliament graphs, although we do some query optimization that relies on information provided by our Parliament graph.


-rob

On Sep 13, 2011, at 11:34 AM, Marco Neumann wrote:

> I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
> year and Parliament looks indeed great, it already uses PostGIS for
> the spatial queries. I am not sure how Parliament relates to the Jena
> API though.
> 
> [1] http://www.vimeo.com/23850413
> 
> 
> On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
>> Hi,
>> 
>> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>> 
>> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
>> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>> 
>> The Parliament geosparql branch is located at [6]
>> 
>> -rob
>> 
>> [1] http://parliament.semwebcentral.org
>> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
>> [3] http://www.w3.org/TR/owl-time/
>> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
>> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
>> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>> 
>> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>> 
>>> There is also Parliament [1] which offers both geospatial and temporal
>>> indexing graphs.
>>> 
>>> Dave
>>> 
>>> [1] http://parliament.semwebcentral.org/
>>> 
>>> 
>>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>>> Hi Alex,
>>>> great to hear that, you are welcome.
>>>> 
>>>> Something similar using Lucene Spatial capabilities instead of
>>>> a proper GIS is here (it's just a less than two days hack):
>>>> https://github.com/castagna/GeoARQ
>>>> 
>>>> I was planning to post something along the lines of "making
>>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>>> not a good idea (yet).
>>>> 
>>>> It would be good to enable third parties to add their own property
>>>> functions (that's possible) which use custom indexes and need to
>>>> update those indexes as triples/quads are added/removed to the
>>>> underlying RDF store.
>>>> 
>>>> More on this later, in the meantime: welcome.
>>>> 
>>>> Paolo
>>>> 
>>>> Alexander Dutton wrote:
>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>> Hash: SHA1
>>>>> 
>>>>> Hi all,
>>>>> 
>>>>> We've currently got a lot of (simple) geospatial data in
>>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>> 
>>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>>> about writing something a bit like LARQ that will pull out things like
>>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>> 
>>>>> Has anyone started doing this or something similar? I'm happy to give
>>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>>> work out how it hooks itself in, and use that as a model.
>>>>> 
>>>>> Yours,
>>>>> 
>>>>> Alex
>>>>> 
>>>>> - --
>>>>> Alexander Dutton
>>>>> Metamorphoses Project Developer, Claros
>>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>>> -----BEGIN PGP SIGNATURE-----
>>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>> 
>>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>>> =r1dj
>>>>> -----END PGP SIGNATURE-----
>>>>> 
>>>> 
>>> 
>>> 
>>> 
>> 
>> 
> 
> 
> 
> -- 
> Marco Neumann
> KONA
> 
> ---
> Join us at the Semantic Web Media Summit in New York City for an
> exciting event on 14 September 2011
> http://www.lotico.com/evt/swmsNYC2011/


Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
I've organized a session with Dave Kolas at MIT/ W3C [1] earlier this
year and Parliament looks indeed great, it already uses PostGIS for
the spatial queries. I am not sure how Parliament relates to the Jena
API though.

[1] http://www.vimeo.com/23850413


On Tue, Sep 13, 2011 at 11:28 AM, Rob Battle <rb...@bbn.com> wrote:
> Hi,
>
> As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.
>
> If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
> We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.
>
> The Parliament geosparql branch is located at [6]
>
> -rob
>
> [1] http://parliament.semwebcentral.org
> [2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
> [3] http://www.w3.org/TR/owl-time/
> [4] http://portal.opengeospatial.org/files/?artifact_id=44722
> [5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
> [6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)
>
> On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:
>
>> There is also Parliament [1] which offers both geospatial and temporal
>> indexing graphs.
>>
>> Dave
>>
>> [1] http://parliament.semwebcentral.org/
>>
>>
>> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote:
>>> Hi Alex,
>>> great to hear that, you are welcome.
>>>
>>> Something similar using Lucene Spatial capabilities instead of
>>> a proper GIS is here (it's just a less than two days hack):
>>> https://github.com/castagna/GeoARQ
>>>
>>> I was planning to post something along the lines of "making
>>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>>> not a good idea (yet).
>>>
>>> It would be good to enable third parties to add their own property
>>> functions (that's possible) which use custom indexes and need to
>>> update those indexes as triples/quads are added/removed to the
>>> underlying RDF store.
>>>
>>> More on this later, in the meantime: welcome.
>>>
>>> Paolo
>>>
>>> Alexander Dutton wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Hi all,
>>>>
>>>> We've currently got a lot of (simple) geospatial data in
>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>
>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>> about writing something a bit like LARQ that will pull out things like
>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>
>>>> Has anyone started doing this or something similar? I'm happy to give
>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>> work out how it hooks itself in, and use that as a model.
>>>>
>>>> Yours,
>>>>
>>>> Alex
>>>>
>>>> - --
>>>> Alexander Dutton
>>>> Metamorphoses Project Developer, Claros
>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>
>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>> =r1dj
>>>> -----END PGP SIGNATURE-----
>>>>
>>>
>>
>>
>>
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Rob Battle <rb...@bbn.com>.
Hi,

As Dave mentioned, Parliament [1] supports geospatial and temporal indexing.  We index data using the geo-owl ontologies [2] for geospatial data and OWL time [3] for temporal data (although only ProperIntervals and DateTimeIntervals are supported, not DateTimeInstants).  The spatial index supports predicates corresponding to RCC-8 and OGC simple features as property functions and can use PostGIS or a memory-mapped r-tree as an index.  

If you are interested, Parliament also has preliminary support for the proposed OGC GeoSPARQL [4] standard for geospatial queries over RDF (note that this is different from http://www.geosparql.org).
We also have an unpublished article [5] which describes GeoSPARQL, evaluates some existing research/implementations in the geospatial semantic web, and describes the GeoSPARQL implementation in Parliament.

The Parliament geosparql branch is located at [6]

-rob

[1] http://parliament.semwebcentral.org
[2] http://www.w3.org/2005/Incubator/geo/XGR-geo/#owl
[3] http://www.w3.org/TR/owl-time/
[4] http://portal.opengeospatial.org/files/?artifact_id=44722
[5] http://semwebcentral.org/scm/viewvc.php/*checkout*/branches/geosparql/paper/swjarticle.pdf?root=parliament
[6] https://projects.semwebcentral.org/svn/parliament/branches/geosparql  (username/password anonsvn)

On Sep 13, 2011, at 8:17 AM, Dave Reynolds wrote:

> There is also Parliament [1] which offers both geospatial and temporal
> indexing graphs.
> 
> Dave
> 
> [1] http://parliament.semwebcentral.org/
> 
> 
> On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote: 
>> Hi Alex,
>> great to hear that, you are welcome.
>> 
>> Something similar using Lucene Spatial capabilities instead of
>> a proper GIS is here (it's just a less than two days hack):
>> https://github.com/castagna/GeoARQ
>> 
>> I was planning to post something along the lines of "making
>> easier to plug LARQ or similar into ARQ", but unfortunately I do
>> not a good idea (yet).
>> 
>> It would be good to enable third parties to add their own property
>> functions (that's possible) which use custom indexes and need to
>> update those indexes as triples/quads are added/removed to the
>> underlying RDF store.
>> 
>> More on this later, in the meantime: welcome.
>> 
>> Paolo
>> 
>> Alexander Dutton wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>> 
>>> Hi all,
>>> 
>>> We've currently got a lot of (simple) geospatial data in
>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>> 
>>> We'd like to do some geospatial indexing magic, and were wondering
>>> about writing something a bit like LARQ that will pull out things like
>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>> 
>>> Has anyone started doing this or something similar? I'm happy to give
>>> it a go and I'm sure my employer would be happy to contribute it back
>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>> work out how it hooks itself in, and use that as a model.
>>> 
>>> Yours,
>>> 
>>> Alex
>>> 
>>> - -- 
>>> Alexander Dutton
>>> Metamorphoses Project Developer, Claros
>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>> 
>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>> =r1dj
>>> -----END PGP SIGNATURE-----
>>> 
>> 
> 
> 
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Dave Reynolds <da...@gmail.com>.
There is also Parliament [1] which offers both geospatial and temporal
indexing graphs.

Dave

[1] http://parliament.semwebcentral.org/


On Tue, 2011-09-13 at 13:08 +0100, Paolo Castagna wrote: 
> Hi Alex,
> great to hear that, you are welcome.
> 
> Something similar using Lucene Spatial capabilities instead of
> a proper GIS is here (it's just a less than two days hack):
> https://github.com/castagna/GeoARQ
> 
> I was planning to post something along the lines of "making
> easier to plug LARQ or similar into ARQ", but unfortunately I do
> not a good idea (yet).
> 
> It would be good to enable third parties to add their own property
> functions (that's possible) which use custom indexes and need to
> update those indexes as triples/quads are added/removed to the
> underlying RDF store.
> 
> More on this later, in the meantime: welcome.
> 
> Paolo
> 
> Alexander Dutton wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> > 
> > Hi all,
> > 
> > We've currently got a lot of (simple) geospatial data in
> > <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
> > 
> > We'd like to do some geospatial indexing magic, and were wondering
> > about writing something a bit like LARQ that will pull out things like
> > geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
> > then implements something like GeoSPARQL (<http://geosparql.org/>).
> > 
> > Has anyone started doing this or something similar? I'm happy to give
> > it a go and I'm sure my employer would be happy to contribute it back
> > to Jena and the ASF. My plan was to go through the LARQ codebase to
> > work out how it hooks itself in, and use that as a model.
> > 
> > Yours,
> > 
> > Alex
> > 
> > - -- 
> > Alexander Dutton
> > Metamorphoses Project Developer, Claros
> > Oxford University Computing Services, ℡ 01865 (6)13483
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.4.11 (GNU/Linux)
> > Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> > 
> > iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
> > 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
> > =r1dj
> > -----END PGP SIGNATURE-----
> > 
> 




Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Alex,
great to hear that, you are welcome.

Something similar using Lucene Spatial capabilities instead of
a proper GIS is here (it's just a less than two days hack):
https://github.com/castagna/GeoARQ

I was planning to post something along the lines of "making
easier to plug LARQ or similar into ARQ", but unfortunately I do
not a good idea (yet).

It would be good to enable third parties to add their own property
functions (that's possible) which use custom indexes and need to
update those indexes as triples/quads are added/removed to the
underlying RDF store.

More on this later, in the meantime: welcome.

Paolo

Alexander Dutton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> 
> We've currently got a lot of (simple) geospatial data in
> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
> 
> We'd like to do some geospatial indexing magic, and were wondering
> about writing something a bit like LARQ that will pull out things like
> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
> then implements something like GeoSPARQL (<http://geosparql.org/>).
> 
> Has anyone started doing this or something similar? I'm happy to give
> it a go and I'm sure my employer would be happy to contribute it back
> to Jena and the ASF. My plan was to go through the LARQ codebase to
> work out how it hooks itself in, and use that as a model.
> 
> Yours,
> 
> Alex
> 
> - -- 
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
> =r1dj
> -----END PGP SIGNATURE-----
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi

I found Apache SIS (Spatial Information System):

 - http://incubator.apache.org/sis/


 "There exist a number of libraries, and frameworks written in Java, C/C++,
  and other P/Ls that deal with the aforementioned issues, however the one
  consistent homogeneity is that most of these software do not include
  ASF-friendly licensing. On the contrary, most of these software systems
  and tools are LGPL licensed, as their use is primarily to produce GIS
  software, which is then sold for a profit. What's more, even the standards
  organization the Open Geospatial Consortium (OGC) promotes the use of LGPL
  SIS/GIS software to implements its interfaces and specifications, leaving
  those interested in a more ASL-friendly solution with a major hole to fill,
  or having to deal with the license implications of leveraging LGPL open
  source software in their applications."

  [...]

 "At the moment, we will build Apache SIS so that is has no external
  dependencies, and is self contained. If we do require common dependencies,
  such as libraries for computation, or for storage/persistence, we will
  ensure that they leverage an ASL or compatible license. For example, to
  support persistence, we may leverage other libraries (e.g., Derby, K/V
  stores, etc.), and in these cases, we will focus on those libraries with
  a compatible license."
  -- http://wiki.apache.org/incubator/SpatialProposal

Source code is here:

 - http://svn.apache.org/repos/asf/incubator/sis/trunk/

It uses Quadtree (as an in-memory data structure :-():

 - http://en.wikipedia.org/wiki/Quadtree

Paolo


On 13 September 2011 12:42, Alexander Dutton
<al...@oucs.ox.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> We've currently got a lot of (simple) geospatial data in
> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>
> We'd like to do some geospatial indexing magic, and were wondering
> about writing something a bit like LARQ that will pull out things like
> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
> then implements something like GeoSPARQL (<http://geosparql.org/>).
>
> Has anyone started doing this or something similar? I'm happy to give
> it a go and I'm sure my employer would be happy to contribute it back
> to Jena and the ASF. My plan was to go through the LARQ codebase to
> work out how it hooks itself in, and use that as a model.
>
> Yours,
>
> Alex
>
> - --
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
> =r1dj
> -----END PGP SIGNATURE-----
>
>

Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Marco Neumann wrote:
> Marco
> 
> well how so? I currently provide GeoSpatialWeb as GNU Lesser GPL +
> r-tree index (Copyright (C) 2002  Navel Ltd.

Hi Marco
see: http://apache.org/legal/3party.html

Probably, not so 'simple'. :-/

> The r-tree index is what you would replace with your PostGIS implementation.

Yep.

> Are you OK with  GNU Lesser GPL. What kind of license would you prefer?

See above.

> I am happy to extend the GeoSpatialWeb  API. Do you plan to support
> geometries or only points?

There is no plan, it depends on what people are willing to do and contribute.

 From my point of view (and Talis), I'd love to have something simple (i.e. easy
to install and manage, almost zero manual intervention, with little dependencies
on third party products, ideally pure Java) to provide simple spatial searches:
with in a circle (results sorted by distance) and bounded box searches.

There are situation where a true GIS is needed, but I don't see that being the
majority of our use cases. In these scenarios however a PostGIS implementation
is obvious preferable.

Is there any relation between the GeoSpatialWeb API and the work in GeoSPARQL?
I know GeoSpatliaWeb predates that, but I wonder if you have any plans in
relation to supporting (or not) GeoSPARQL.

Thanks,
Paolo

> 
> Marco
> 
> On Tue, Sep 13, 2011 at 11:03 AM, Paolo Castagna
> <ca...@googlemail.com> wrote:
>> Marco Neumann wrote:
>>> Hi Alex,
>>>
>>> you can "easily" extend GeoSPARQL to support your desired geospatial
>>> index.
>>>
>>> We use a spatial filter during query processing for candidate
>>> selection as outlined by Voissard in Spatial Databases an Introduction
>>> [1]. It would be great if you could build on what we already have in
>>> the geospatialweb project
>>>
>>> http://code.google.com/p/geospatialweb/
>> Hi Marco,
>> if we want to have this contributed to the Apache Jena project, do you think
>> there will be problems in relation to licenses of GeoSPARQL or any of its
>> dependencies?
>>
>> Thanks,
>> Paolo
>>
>>>
>>> Best,
>>> Marco
>>>
>>>
>>>
>>> [1] http://page.mi.fu-berlin.de/voisard/
>>>
>>> On Tue, Sep 13, 2011 at 7:42 AM, Alexander Dutton
>>> <al...@oucs.ox.ac.uk> wrote:
>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>> Hash: SHA1
>>>>
>>>> Hi all,
>>>>
>>>> We've currently got a lot of (simple) geospatial data in
>>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>>
>>>> We'd like to do some geospatial indexing magic, and were wondering
>>>> about writing something a bit like LARQ that will pull out things like
>>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>>
>>>> Has anyone started doing this or something similar? I'm happy to give
>>>> it a go and I'm sure my employer would be happy to contribute it back
>>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>>> work out how it hooks itself in, and use that as a model.
>>>>
>>>> Yours,
>>>>
>>>> Alex
>>>>
>>>> - --
>>>> Alexander Dutton
>>>> Metamorphoses Project Developer, Claros
>>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>>> -----BEGIN PGP SIGNATURE-----
>>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>>
>>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>>> =r1dj
>>>> -----END PGP SIGNATURE-----
>>>>
>>>>
>>>
>>>
>>
> 
> 
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
Marco

well how so? I currently provide GeoSpatialWeb as GNU Lesser GPL +
r-tree index (Copyright (C) 2002  Navel Ltd.

The r-tree index is what you would replace with your PostGIS implementation.

Are you OK with  GNU Lesser GPL. What kind of license would you prefer?

I am happy to extend the GeoSpatialWeb  API. Do you plan to support
geometries or only points?

Marco

On Tue, Sep 13, 2011 at 11:03 AM, Paolo Castagna
<ca...@googlemail.com> wrote:
> Marco Neumann wrote:
>>
>> Hi Alex,
>>
>> you can "easily" extend GeoSPARQL to support your desired geospatial
>> index.
>>
>> We use a spatial filter during query processing for candidate
>> selection as outlined by Voissard in Spatial Databases an Introduction
>> [1]. It would be great if you could build on what we already have in
>> the geospatialweb project
>>
>> http://code.google.com/p/geospatialweb/
>
> Hi Marco,
> if we want to have this contributed to the Apache Jena project, do you think
> there will be problems in relation to licenses of GeoSPARQL or any of its
> dependencies?
>
> Thanks,
> Paolo
>
>>
>>
>> Best,
>> Marco
>>
>>
>>
>> [1] http://page.mi.fu-berlin.de/voisard/
>>
>> On Tue, Sep 13, 2011 at 7:42 AM, Alexander Dutton
>> <al...@oucs.ox.ac.uk> wrote:
>>>
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hi all,
>>>
>>> We've currently got a lot of (simple) geospatial data in
>>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>>
>>> We'd like to do some geospatial indexing magic, and were wondering
>>> about writing something a bit like LARQ that will pull out things like
>>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>>
>>> Has anyone started doing this or something similar? I'm happy to give
>>> it a go and I'm sure my employer would be happy to contribute it back
>>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>>> work out how it hooks itself in, and use that as a model.
>>>
>>> Yours,
>>>
>>> Alex
>>>
>>> - --
>>> Alexander Dutton
>>> Metamorphoses Project Developer, Claros
>>> Oxford University Computing Services, ℡ 01865 (6)13483
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.11 (GNU/Linux)
>>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>>
>>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>>> =r1dj
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>
>>
>>
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Marco Neumann wrote:
> Hi Alex,
> 
> you can "easily" extend GeoSPARQL to support your desired geospatial index.
> 
> We use a spatial filter during query processing for candidate
> selection as outlined by Voissard in Spatial Databases an Introduction
> [1]. It would be great if you could build on what we already have in
> the geospatialweb project
> 
> http://code.google.com/p/geospatialweb/

Hi Marco,
if we want to have this contributed to the Apache Jena project, do you think
there will be problems in relation to licenses of GeoSPARQL or any of its
dependencies?

Thanks,
Paolo

> 
> 
> Best,
> Marco
> 
> 
> 
> [1] http://page.mi.fu-berlin.de/voisard/
> 
> On Tue, Sep 13, 2011 at 7:42 AM, Alexander Dutton
> <al...@oucs.ox.ac.uk> wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hi all,
>>
>> We've currently got a lot of (simple) geospatial data in
>> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>>
>> We'd like to do some geospatial indexing magic, and were wondering
>> about writing something a bit like LARQ that will pull out things like
>> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
>> then implements something like GeoSPARQL (<http://geosparql.org/>).
>>
>> Has anyone started doing this or something similar? I'm happy to give
>> it a go and I'm sure my employer would be happy to contribute it back
>> to Jena and the ASF. My plan was to go through the LARQ codebase to
>> work out how it hooks itself in, and use that as a model.
>>
>> Yours,
>>
>> Alex
>>
>> - --
>> Alexander Dutton
>> Metamorphoses Project Developer, Claros
>> Oxford University Computing Services, ℡ 01865 (6)13483
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
>> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
>> =r1dj
>> -----END PGP SIGNATURE-----
>>
>>
> 
> 
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
Hi Alex,

you can "easily" extend GeoSPARQL to support your desired geospatial index.

We use a spatial filter during query processing for candidate
selection as outlined by Voissard in Spatial Databases an Introduction
[1]. It would be great if you could build on what we already have in
the geospatialweb project

http://code.google.com/p/geospatialweb/


Best,
Marco



[1] http://page.mi.fu-berlin.de/voisard/

On Tue, Sep 13, 2011 at 7:42 AM, Alexander Dutton
<al...@oucs.ox.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi all,
>
> We've currently got a lot of (simple) geospatial data in
> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
>
> We'd like to do some geospatial indexing magic, and were wondering
> about writing something a bit like LARQ that will pull out things like
> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
> then implements something like GeoSPARQL (<http://geosparql.org/>).
>
> Has anyone started doing this or something similar? I'm happy to give
> it a go and I'm sure my employer would be happy to contribute it back
> to Jena and the ASF. My plan was to go through the LARQ codebase to
> work out how it hooks itself in, and use that as a model.
>
> Yours,
>
> Alex
>
> - --
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
> =r1dj
> -----END PGP SIGNATURE-----
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Marco Neumann <ma...@gmail.com>.
On Tue, Sep 13, 2011 at 11:14 AM, Alexander Dutton
<al...@oucs.ox.ac.uk> wrote:
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 13/09/11 15:52, Paolo Castagna wrote:
>> Which kind of queries you would like/need to run?
>
> Probably just (non-BB) containment and distance to start with.
>
>> Ideally, it would be good to have something pure Java which keeps
>> things very simple to install. Ideally, zero installation cost:
>> download, unzip, load data, run (as it is for Fuseki).
>
> I agree. I've previously done some GeoDjango stuff, and even just
> creating the PostGIS DB template was 'fun'. The minimum requirement
> would be to set up a blank Postgres DB, provide {host, user, password}
> details in the assembly and have it take it from there…
>
>> What would be the best way to integrate|use such extensions into
>> Fuseki? Ideally, with 0 changes to Fuseki code base... is that
>> currently possible?
>
> I've previously written a custom describe handler that IIRC uses
> ja:loadClass to hook itself in, so it's certainly possible…
>
>> Also, I have not been following the progress around GeoSPARQL:
>> http://www.opengeospatial.org/projects/groups/geosparqlswg ... is
>> there anything interesting/relevant there? Code? :-)
>
> Me neither, I'm afraid.

Well they have released the GeoSPARQL recommendation. It's all plain
vanilla but not specifically contextualized with Jena/ARQ.

On the otherhand the GeoSPARQL.org stuff runs on the Jena+GeoSpatial
extension since 2007.

Marco

>
>> Finally, things to think about are:
>>
>> - how to you initially build your geo indexes [and] keep those
>> indexes up-to-date as you add/remove triples|quads?
>
> I would be happy with a manual cmd (again, following how LARQ does it
> atm). Mind you, our data changes infrequently, so I'm happy for them
> to get out-of-sync for short periods. Other people might be less happy ;).
>
> Does Fuseki/TDB currently fire off some kind of signal when updates
> happen?
>
>> Ideally, I'd like to have a way to add property functions to ARQ
>> (and use them with TDB datasets or Fuseki) without changing ARQ or
>> TDB nor Fuseki source code. You drop a jar in your class path and
>> the property function as well as keeping indexes up-to-date is
>> there.
>
> Is this not possible with the ja:loadClass approach?
>
> - - Alex
>
> - --
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk5vc1UACgkQS0pRIabRbjB50ACggZkT8fnvFhSUOrK55+0JHSi4
> n0kAn1WWOSi74YKtI4TPx52q6ir/mH5W
> =W9Ye
> -----END PGP SIGNATURE-----
>
>



-- 
Marco Neumann
KONA

---
Join us at the Semantic Web Media Summit in New York City for an
exciting event on 14 September 2011
http://www.lotico.com/evt/swmsNYC2011/

Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Andy Seaborne wrote:
> 
> 
> On 13/09/11 17:45, Paolo Castagna wrote:
>> Andy Seaborne wrote:
>>>
>>>
>>> On 13/09/11 16:14, Alexander Dutton wrote:
>>>> Does Fuseki/TDB currently fire off some kind of signal when updates
>>>> happen?
>>>
>>> Handling of events isn't consistent yet.
>>>
>>> Each GraphStore sees startRequest()/finishRequest() around a SPARQL
>>> Update. That should be roughly what you are looking for, I guess.
>>>
>>> There isn't an event down to the level of each quad added or removed.
>>
>> This might be easier for developers (since they don't need to parse
>> the SPARQL Update request).
>>
>> But, maybe there is a good reason why there isn't an event down to the
>> level of each quad added|removed. Let me guess: performances? :-)
> 
> Not some much this time - here, it's consistency of the data.
> 
> What does it mean to signal a quad added or removed without context? 
> e.g. for geo, it may take several triples to change the dataset from one 
> application-consistent view to another.
> 
> Context matters here and just seeing a triple/quad change is a bit 
> useless.  What if you want to see a set of changes ... like one complete 
> update.

In the case of LARQ, a single triple/quad would be sufficient, since that
represent the complete update in order to update the underlying Lucene
index.

However, this is a special and very simple case, in comparison to what you
might want to do in general.

Even the simplest geospatial index, for example, you want to have at least
two triples/quads: latitude and longitude.

Is there something in between SPARQL Update and triples/quads which would
simplify things for developers or receiving SPARQL Update notifications is
simple enough and the best thing to do?

> 
>>
>>> Now is a good time to work out the details of what's wanted. The
>>> original jena events mechanism works well but places the events on an
>>> object, so only objects supporting the event interface participate.
>>> Makes global or general events unnatural as well.
>>
>> Yep.
>>
>>  From a LARQ or similar point of view (i.e. third party custom indexes)
>> it would be extremely easy to be able to be notified for each quad
>> added or removed.
>>
>> This way and external index can be kept up-to-date as data changes.
>>
>> Often, there are little changes and it's a waste of time/resources
>> (and it require manual intervention or automated scripts) to re-index
>> everything just because a small percentage of data has changed.
> 
> An example of wanting set of changes.

Yep, that would work as well.

>>> The package org.openjena.atlas.event (in ARQ) is my attempt to retain
>>> the light weigh event mechanism but decouple it from an event
>>> interface. You can send events relating to objects without the objects
>>> participation.
>>
>> I'll have a look (and see if I can use that in LARQ).
> 
> I suspect we need a system-wide design - e.g. events on transactions. 
> And transactions give a consistency point as well.

events on transactions == fire the event (with the set of changes) after
the transaction has been committed successfully?

Paolo

> 
>     Andy
> 
>>
>> Thanks,
>> Paolo
>>
>>>
>>> Andy
>>


Re: Jena and PostGIS (à la LARQ)

Posted by Andy Seaborne <an...@epimorphics.com>.

On 13/09/11 17:45, Paolo Castagna wrote:
> Andy Seaborne wrote:
>>
>>
>> On 13/09/11 16:14, Alexander Dutton wrote:
>>> Does Fuseki/TDB currently fire off some kind of signal when updates
>>> happen?
>>
>> Handling of events isn't consistent yet.
>>
>> Each GraphStore sees startRequest()/finishRequest() around a SPARQL
>> Update. That should be roughly what you are looking for, I guess.
>>
>> There isn't an event down to the level of each quad added or removed.
>
> This might be easier for developers (since they don't need to parse
> the SPARQL Update request).
>
> But, maybe there is a good reason why there isn't an event down to the
> level of each quad added|removed. Let me guess: performances? :-)

Not some much this time - here, it's consistency of the data.

What does it mean to signal a quad added or removed without context? 
e.g. for geo, it may take several triples to change the dataset from one 
application-consistent view to another.

Context matters here and just seeing a triple/quad change is a bit 
useless.  What if you want to see a set of changes ... like one complete 
update.

>
>> Now is a good time to work out the details of what's wanted. The
>> original jena events mechanism works well but places the events on an
>> object, so only objects supporting the event interface participate.
>> Makes global or general events unnatural as well.
>
> Yep.
>
>  From a LARQ or similar point of view (i.e. third party custom indexes)
> it would be extremely easy to be able to be notified for each quad
> added or removed.
>
> This way and external index can be kept up-to-date as data changes.
>
> Often, there are little changes and it's a waste of time/resources
> (and it require manual intervention or automated scripts) to re-index
> everything just because a small percentage of data has changed.

An example of wanting set of changes.

>
>>
>> The package org.openjena.atlas.event (in ARQ) is my attempt to retain
>> the light weigh event mechanism but decouple it from an event
>> interface. You can send events relating to objects without the objects
>> participation.
>
> I'll have a look (and see if I can use that in LARQ).

I suspect we need a system-wide design - e.g. events on transactions. 
And transactions give a consistency point as well.

	Andy

>
> Thanks,
> Paolo
>
>>
>> Andy
>

Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Andy Seaborne wrote:
> 
> 
> On 13/09/11 16:14, Alexander Dutton wrote:
>> Does Fuseki/TDB currently fire off some kind of signal when updates
>> happen?
> 
> Handling of events isn't consistent yet.
> 
> Each GraphStore sees startRequest()/finishRequest() around a SPARQL 
> Update.  That should be roughly what you are looking for, I guess.
> 
> There isn't an event down to the level of each quad added or removed.

This might be easier for developers (since they don't need to parse
the SPARQL Update request).

But, maybe there is a good reason why there isn't an event down to the
level of each quad added|removed. Let me guess: performances? :-)

> Now is a good time to work out the details of what's wanted.  The 
> original jena events mechanism works well but places the events on an 
> object, so only objects supporting the event interface participate. 
> Makes global or general events unnatural as well.

Yep.

 From a LARQ or similar point of view (i.e. third party custom indexes)
it would be extremely easy to be able to be notified for each quad
added or removed.

This way and external index can be kept up-to-date as data changes.

Often, there are little changes and it's a waste of time/resources
(and it require manual intervention or automated scripts) to re-index
everything just because a small percentage of data has changed.

> 
> The package org.openjena.atlas.event (in ARQ) is my attempt to retain 
> the light weigh event mechanism but decouple it from an event interface. 
>  You can send events relating to objects without the objects participation.

I'll have a look (and see if I can use that in LARQ).

Thanks,
Paolo

> 
>     Andy


Re: Jena and PostGIS (à la LARQ)

Posted by Andy Seaborne <an...@epimorphics.com>.

On 13/09/11 16:14, Alexander Dutton wrote:
> Does Fuseki/TDB currently fire off some kind of signal when updates
> happen?

Handling of events isn't consistent yet.

Each GraphStore sees startRequest()/finishRequest() around a SPARQL 
Update.  That should be roughly what you are looking for, I guess.

There isn't an event down to the level of each quad added or removed.


Now is a good time to work out the details of what's wanted.  The 
original jena events mechanism works well but places the events on an 
object, so only objects supporting the event interface participate. 
Makes global or general events unnatural as well.

The package org.openjena.atlas.event (in ARQ) is my attempt to retain 
the light weigh event mechanism but decouple it from an event interface. 
  You can send events relating to objects without the objects participation.

	Andy

Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Alex

Alexander Dutton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 13/09/11 15:52, Paolo Castagna wrote:
>> Which kind of queries you would like/need to run?
> 
> Probably just (non-BB) containment and distance to start with.

Ack.

Containment == is a shape|polygon|point fully contained into
another shape|polygon?

Distance == distance between two points or two polygons or
a point and a polygon?

> 
>> Ideally, it would be good to have something pure Java which keeps
>> things very simple to install. Ideally, zero installation cost:
>> download, unzip, load data, run (as it is for Fuseki).
> 
> I agree. I've previously done some GeoDjango stuff, and even just
> creating the PostGIS DB template was 'fun'. The minimum requirement
> would be to set up a blank Postgres DB, provide {host, user, password}
> details in the assembly and have it take it from there…
> 
>> What would be the best way to integrate|use such extensions into
>> Fuseki? Ideally, with 0 changes to Fuseki code base... is that
>> currently possible?
> 
> I've previously written a custom describe handler that IIRC uses
> ja:loadClass to hook itself in, so it's certainly possible…

Ack.

I wonder if things could be improved (i.e. simplified) for LARQ as well
using ja:loadClass. As I said, I am not an assembly guru myself and help
or suggestions on this are welcome.

I'll give ja:loadClass capabilities a serious look and try it.

These are the two property functions I came up with in my quick hack:

   ?s geoarq:nearby (x y) .
   ?s geoarq:within (x1 y1 x2 y2) .

... pretty self explanatory.

What do you have or would you like to have?

>> Also, I have not been following the progress around GeoSPARQL:
>> http://www.opengeospatial.org/projects/groups/geosparqlswg ... is
>> there anything interesting/relevant there? Code? :-)
> 
> Me neither, I'm afraid.
> 
>> Finally, things to think about are:
>>
>> - how to you initially build your geo indexes [and] keep those
>> indexes up-to-date as you add/remove triples|quads?
> 
> I would be happy with a manual cmd (again, following how LARQ does it
> atm). Mind you, our data changes infrequently, so I'm happy for them
> to get out-of-sync for short periods. Other people might be less happy ;).
> 
> Does Fuseki/TDB currently fire off some kind of signal when updates
> happen?

LARQ uses the StatementListener mechanism in Jena:
http://svn.apache.org/repos/asf/incubator/jena/Jena2/LARQ/trunk/src/main/java/org/apache/jena/larq/IndexBuilderModel.java
... there might be a better way (i.e. a new/better event system) but
I've not tried it yet.

For some of our use cases it is not acceptable to have indexes out-of-sync
for a too long period of time. Often users post some RDF data and almost
immediately after search for it (to see if it's there) and sometimes they
use free text searches for that (or their UI use it behind the scenes).

>> Ideally, I'd like to have a way to add property functions to ARQ
>> (and use them with TDB datasets or Fuseki) without changing ARQ or
>> TDB nor Fuseki source code. You drop a jar in your class path and
>> the property function as well as keeping indexes up-to-date is
>> there.
> 
> Is this not possible with the ja:loadClass approach?

Probably yes. As I said, I am not an assembler guru...

Using the ja:loadClass I am not sure how you would attach the various
Model to listen for updates (in order to keep the index up-to-date).

Would that be possible?

Paolo

> 
> - - Alex
> 
> - -- 
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk5vc1UACgkQS0pRIabRbjB50ACggZkT8fnvFhSUOrK55+0JHSi4
> n0kAn1WWOSi74YKtI4TPx52q6ir/mH5W
> =W9Ye
> -----END PGP SIGNATURE-----
> 


Re: Jena and PostGIS (à la LARQ)

Posted by Alexander Dutton <al...@oucs.ox.ac.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 13/09/11 15:52, Paolo Castagna wrote:
> Which kind of queries you would like/need to run?

Probably just (non-BB) containment and distance to start with.

> Ideally, it would be good to have something pure Java which keeps
> things very simple to install. Ideally, zero installation cost:
> download, unzip, load data, run (as it is for Fuseki).

I agree. I've previously done some GeoDjango stuff, and even just
creating the PostGIS DB template was 'fun'. The minimum requirement
would be to set up a blank Postgres DB, provide {host, user, password}
details in the assembly and have it take it from there…

> What would be the best way to integrate|use such extensions into
> Fuseki? Ideally, with 0 changes to Fuseki code base... is that
> currently possible?

I've previously written a custom describe handler that IIRC uses
ja:loadClass to hook itself in, so it's certainly possible…

> Also, I have not been following the progress around GeoSPARQL:
> http://www.opengeospatial.org/projects/groups/geosparqlswg ... is
> there anything interesting/relevant there? Code? :-)

Me neither, I'm afraid.

> Finally, things to think about are:
>
> - how to you initially build your geo indexes [and] keep those
> indexes up-to-date as you add/remove triples|quads?

I would be happy with a manual cmd (again, following how LARQ does it
atm). Mind you, our data changes infrequently, so I'm happy for them
to get out-of-sync for short periods. Other people might be less happy ;).

Does Fuseki/TDB currently fire off some kind of signal when updates
happen?

> Ideally, I'd like to have a way to add property functions to ARQ
> (and use them with TDB datasets or Fuseki) without changing ARQ or
> TDB nor Fuseki source code. You drop a jar in your class path and
> the property function as well as keeping indexes up-to-date is
> there.

Is this not possible with the ja:loadClass approach?

- - Alex

- -- 
Alexander Dutton
Metamorphoses Project Developer, Claros
Oxford University Computing Services, ℡ 01865 (6)13483
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAk5vc1UACgkQS0pRIabRbjB50ACggZkT8fnvFhSUOrK55+0JHSi4
n0kAn1WWOSi74YKtI4TPx52q6ir/mH5W
=W9Ye
-----END PGP SIGNATURE-----


Re: Jena and PostGIS (à la LARQ)

Posted by Paolo Castagna <ca...@googlemail.com>.
Hi Alex

Alexander Dutton wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Hi all,
> 
> We've currently got a lot of (simple) geospatial data in
> <http://data.clarosnet.org/> (served behind the scenes by Fuseki).
> 
> We'd like to do some geospatial indexing magic, and were wondering
> about writing something a bit like LARQ that will pull out things like
> geo:Points and WKT literals, place them in a PostGIS-flavoured DB, and
> then implements something like GeoSPARQL (<http://geosparql.org/>).

Which kind of queries you would like/need to run?

The use cases I've seen (on the job) are often quite simple, since users
are not GIS expert. The vast majority of them can be reduced to:

  - searching near by a point (often sorting results by distance)
  - searching within a bounded box

Ideally, it would be good to have something pure Java which keeps
things very simple to install. Ideally, zero installation cost:
download, unzip, load data, run (as it is for Fuseki).

What would be the best way to integrate|use such extensions into Fuseki?
Ideally, with 0 changes to Fuseki code base... is that currently possible?

Also, I have not been following the progress around GeoSPARQL:
http://www.opengeospatial.org/projects/groups/geosparqlswg
... is there anything interesting/relevant there? Code? :-)

Finally, things to think about are:

  - how to you initially build your geo indexes?
  - how you keep those indexes up-to-date as you add/remove triples|quads?
  - how do we plug-in|use|integrate this from|into ARQ (or TDB or Fuseki)?

Currently, I am not completely satisfied by how we|I do this with LARQ
(via assemblers), but maybe it's just because I am not an Jena's assembler
guru.

Ideally, I'd like to have a way to add property functions to ARQ (and use
them with TDB datasets or Fuseki) without changing ARQ or TDB nor Fuseki
source code. You drop a jar in your class path and the property function
as well as keeping indexes up-to-date is there.

Paolo

> 
> Has anyone started doing this or something similar? I'm happy to give
> it a go and I'm sure my employer would be happy to contribute it back
> to Jena and the ASF. My plan was to go through the LARQ codebase to
> work out how it hooks itself in, and use that as a model.
> 
> Yours,
> 
> Alex
> 
> - -- 
> Alexander Dutton
> Metamorphoses Project Developer, Claros
> Oxford University Computing Services, ℡ 01865 (6)13483
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
> 
> iEYEARECAAYFAk5vQbgACgkQS0pRIabRbjC9QACfTZtTcFIhDXjWPR+MpEWunKkt
> 38oAnR5n+oi1nuTZAfRdOrF2mcOac2Ck
> =r1dj
> -----END PGP SIGNATURE-----
>