Calculate Distance between Two Points

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Calculate Distance between Two Points

Anjitha
Hi


I need to calculate distance between two points and the calculated distance has to put in to XML encored in WFS request.

Here is my WFS query

http://svr-demo02:8080/geoserver/ows?service=WFS&
version=1.0.0&
request=GetFeature&
typeName=BLPU&
PropertyName=UPRN,GEOMETRY&
cql_filter=INTERSECTS(GEOMETRY,bufferWithSegments(POINT(559190 97700),20,8))&
maxFeatures=20
 
I am using buffer with segment to find points around to a known point. Now I need to calculate the distance to each point from the known point. In this example my know point is (POINT(559190 97700) EPSG:27700 projection system)

Has anyone calculate Returns the euclidean distance between the two geometries using Distance filter in Geoserver ?

How can we get the distance and wrap it in  WFS out put (XML) in each point found in buffer zone?

Much appreciate your help