Hi Andy,
thanks again for the previous help related to jena spatial. After that I added 
new data using the ogc:asWKT property to index POINTs and Polygon. The data 
file can be seen at the url
http://www.sharesemantics.com/test/jena/spatial-data-wkt.ttl
The indexing works fine with POINTs. I had just to add the 
SpatialContextFactory in the assembler  and the JTS jar file ( jts-1.13.jar ) 
to the classpath. After that I can use the query
PREFIX spatial: <http://jena.apache.org/spatial#>SELECT *  {    ?place 
spatial:nearby (40.77 -73.87 10 'km') .
}
to discover that the nearby point is the LaGuardia Airport. Running the next 
query
PREFIX spatial: <http://jena.apache.org/spatial#>SELECT *  {    ?place 
spatial:nearby (51.21 -2.00 10 'km') .}
I would expect to find one of the vertices of one polygon but it return an 
empty result that means my assumption, that vertices of polygons are indexed, 
is false. 
My questions are the following:
1) How polygons are indexed in jena spatial ?2) How to implement a property 
function to find a point within a polygon, so that I can use a new property, 
something like spatial:withinBox but for polygons of any shape, in a SPARQL 
query ?
Thanks
Luigi








                                          

Reply via email to