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 <[email protected]> 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 <[email protected]> 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/
> 

Reply via email to