fr.ign.cogit.alpage.morphal.geometry
Class LineStringUtil
java.lang.Object
fr.ign.cogit.alpage.morphal.geometry.LineStringUtil
public class LineStringUtil
- extends java.lang.Object
Geometric methods to manipulate geometric features with LineString
and MultiLineString
types (cleaning methods only at the moment).
- Version:
- 0.1 (2011-01-09)
- Author:
- Eric Grosso - IGN / Laboratoire COGIT
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LineStringUtil
public LineStringUtil()
cleaningLineShape
public static LineString cleaningLineShape(LineString line,
double threshold)
- Clean a
LineString
by removing the unuseful points (in regard to the
chosen threshold) of a LineString
, i.e. the points which are in the
alignment between the previous point and the following one. The alignment
is here defined thanks to a given threshold comparatively to Pi (or 180°).
The threshold has to be expressed in degrees.
- Parameters:
line
- linestring to cleanthreshold
- threshold in degrees to remove points which are aligned
with an angle of 180 +/- threshold in the linestring
- Returns:
- a new and cleaned linestring
cleaningMultiLineShape
public static MultiLineString cleaningMultiLineShape(MultiLineString multiLine,
double threshold)
- Clean a
MultiLineString
by removing the unuseful points (in regard to the
chosen threshold) of a MultiLineString
, i.e. the points which are in the
alignment between the previous point and the following one. The alignment
is here defined thanks to a given threshold comparatively to Pi (or 180°).
The threshold has to be expressed in degrees.
- Parameters:
multiLine
- multilinestring to cleanthreshold
- threshold in degrees to remove points which are aligned
with an angle of 180 +/- threshold in the multilinestring
- Returns:
- a new and cleaned multilinestring