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 example query from the BaseX docs I came up with the following query as a test:
import module namespace geo = "http://expath.org/ns/geo"; declare namespace gml='http://www.opengis.net/gml';
let $vancouver := <gml:Point srsDimension="2" srsName="http://www.opengis.net/def/crs/EPSG/0/4326%22%3E gml:pos49.40 -123.26</gml:pos> </gml:Point>
let $seattle := <gml:Point srsDimension="2" srsName="http://www.opengis.net/def/crs/EPSG/0/4326%22%3E gml:pos47.68 -122.37</gml:pos> </gml:Point>
return geo:distance($vancouver, $seattle)
I have this in a file and am trying to execute it from the CLI with: 'RUN [/path/to/file]'
It pukes with this error:
Stopped at [/path/to/file], 12/21: [GEO:GEO0002] java.lang.NullPointerException
I am running off of the zip distribution of BaseX so I believe the geo module should be included.
Any guidance would be greatly appreciated.
Best, -Jesse