geotools:Shortest distance between a line segment and a point in WGS84 crs using geotools api
作者:互联网
In geotools you can find distance between two geometries using the distance function in Geometry class. There is a Point subclass of Geometry but no line segment subclass of Geometry. There is however LineSegment class which derives from LineString which is not subclass of Geometry class. I tried using JTS but it appears as JTS is only for Cartesian coordinate system.
Question: How to find shortest distance (in meters) between a LineSegment and a Point in WGS84 crs.
Please note: I know there are answers available on SO for doing this without using geotools. Since we are using geotools in our project and code maintainability is very important I want to do it in geotools.
标签:distance,geotools,Geometry,subclass,between,using 来源: https://www.cnblogs.com/2008nmj/p/16314631.html