[basex-talk] NullPointerException when executing geo:distance query

2014-03-26 Thread Jesse Clark
Hi All, I am writing a feature that will rely on geo:distance to give me the distance between two points of latitude and longitude. I am a total n00b to GIS and GML so I may have messed this up, but based on a bit of research to figure out how to define the coordinate system and based on the e

Re: [basex-talk] NullPointerException when executing geo:distance query

2014-03-26 Thread Zachary DeLuca
Hi Jesse, BaseX only supports GML 2, and AFAIK gml:pos was not introduced until GML 3. You need to use gml:coordinate instead (which uses a comma instead of a space as a delimiter). This works for me: import module namespace geo = "http://expath.org/ns/geo";; declare namespace gml='http://www.ope

Re: [basex-talk] NullPointerException when executing geo:distance query

2014-03-27 Thread Christian GrĂ¼n
Hi Jesse, as Zachary thankfully pointed out, our implementation only supports GML 2.0. It is based on the JTS library [1], which seems to return a NullPointerException for geo elements that do not comply with 2.0. I've slightly updated the error message [2] to make clearer what's going on. Best,

Re: [basex-talk] NullPointerException when executing geo:distance query

2014-03-27 Thread Jesse Clark
Thanks for the info guys. GML 2.0 does support srs attributes according to the spec (and JTS claims to too according to that spec). But I'm not sure if my srsName declaration is having any effect. Using 69.1 miles per degree of latitude (assuming the result is in degrees of latitude) gives 13

Re: [basex-talk] NullPointerException when executing geo:distance query

2014-03-27 Thread Jesse Clark
Just to correct myself the actual distance should be 125.6. :) On Mar 27, 2014, at 11:05 AM, Jesse Clark wrote: > Thanks for the info guys. > > GML 2.0 does support srs attributes according to the spec (and JTS claims to > too according to that spec). > > But I'm not sure if my srsName decl