public class GeometryUtils extends Object
| Constructor and Description |
|---|
GeometryUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
clearDbfFile(String fileName)
Removes all content from the given shp or shx file, so that the file contains only the header.
|
static void |
clearShpOrShxFile(String fileName,
int shpGeoType)
Removes all content from the given shp or shx file, so that the file contains only the header.
|
static com.vividsolutions.jts.geom.Geometry |
createDummyGeometry(String geometryType)
Creates a dummy geometry of the given type.
|
static byte |
getShpGeometryType(String geometryType)
Determines the shape geometry type.
|
static boolean |
isLineOrPoint(com.vividsolutions.jts.geom.Geometry geom)
DOCUMENT ME!
|
static com.vividsolutions.jts.geom.Geometry |
makeValid(com.vividsolutions.jts.geom.Geometry g)
Let the db executes a makeValid on the given geometry.
|
static com.vividsolutions.jts.geom.Geometry |
setEndpointOfLine(com.vividsolutions.jts.geom.Geometry line,
com.vividsolutions.jts.geom.Coordinate newEndpoint)
Set the end point of the given line to the given coordinate.
|
static com.vividsolutions.jts.geom.Geometry[] |
splitGeom(com.vividsolutions.jts.geom.Geometry geom,
com.vividsolutions.jts.geom.LineString splitLine)
Splits the given geometry at the given line.
|
static com.vividsolutions.jts.geom.Geometry[] |
splitPolygon(com.vividsolutions.jts.geom.Geometry sourceGeom,
com.vividsolutions.jts.geom.LineString splitter)
The algorithm was taken from http://wiki.postgis.org/support/wiki/index.php?SplitPolygonWithLineString.
|
static com.vividsolutions.jts.geom.Geometry |
unionFeatureEnvelopes(List<de.cismet.cismap.commons.features.FeatureServiceFeature> sourceFeatures)
Unions the geometries of the given features.
|
static com.vividsolutions.jts.geom.Geometry |
unionFeatureGeometries(List<de.cismet.cismap.commons.features.FeatureServiceFeature> sourceFeatures)
Unions the geometries of the given features.
|
static com.vividsolutions.jts.geom.Geometry |
unionGeometries(List<com.vividsolutions.jts.geom.Geometry> geom,
int from,
int to)
An union method that is faster as the iterativ approach with the union() method.
|
static com.vividsolutions.jts.geom.Geometry |
unionGeometries2(List<com.vividsolutions.jts.geom.Geometry> geomList)
DOCUMENT ME!
|
static com.vividsolutions.jts.geom.Geometry |
unionPolygons(List<com.vividsolutions.jts.geom.Geometry> geomList)
DOCUMENT ME!
|
public static com.vividsolutions.jts.geom.Geometry makeValid(com.vividsolutions.jts.geom.Geometry g)
throws Exception
g - the geometry to make validException - DOCUMENT ME!public static com.vividsolutions.jts.geom.Geometry[] splitGeom(com.vividsolutions.jts.geom.Geometry geom,
com.vividsolutions.jts.geom.LineString splitLine)
geom - the geometry to splitsplitLine - the geometry will be splitted at this linestringpublic static com.vividsolutions.jts.geom.Geometry[] splitPolygon(com.vividsolutions.jts.geom.Geometry sourceGeom,
com.vividsolutions.jts.geom.LineString splitter)
sourceGeom - a polygonsplitter - the linestring to split the polygonpublic static com.vividsolutions.jts.geom.Geometry unionFeatureEnvelopes(List<de.cismet.cismap.commons.features.FeatureServiceFeature> sourceFeatures)
sourceFeatures - the features the unionpublic static com.vividsolutions.jts.geom.Geometry unionFeatureGeometries(List<de.cismet.cismap.commons.features.FeatureServiceFeature> sourceFeatures)
sourceFeatures - the features the unionpublic static com.vividsolutions.jts.geom.Geometry unionGeometries(List<com.vividsolutions.jts.geom.Geometry> geom, int from, int to)
geom - the list with the geometries to unionfrom - the index of the first element that should be used for the union operationto - the index of the last element that should be used for the union operationpublic static com.vividsolutions.jts.geom.Geometry unionGeometries2(List<com.vividsolutions.jts.geom.Geometry> geomList)
geomList - DOCUMENT ME!public static boolean isLineOrPoint(com.vividsolutions.jts.geom.Geometry geom)
geom - DOCUMENT ME!public static com.vividsolutions.jts.geom.Geometry unionPolygons(List<com.vividsolutions.jts.geom.Geometry> geomList)
geomList - DOCUMENT ME!public static com.vividsolutions.jts.geom.Geometry setEndpointOfLine(com.vividsolutions.jts.geom.Geometry line,
com.vividsolutions.jts.geom.Coordinate newEndpoint)
throws IllegalArgumentException
line - a LineString or MultiLineStringnewEndpoint - the new end pointIllegalArgumentException - DOCUMENT ME!public static com.vividsolutions.jts.geom.Geometry createDummyGeometry(String geometryType)
geometryType - DOCUMENT ME!public static byte getShpGeometryType(String geometryType)
geometryType - DOCUMENT ME!public static void clearShpOrShxFile(String fileName, int shpGeoType) throws IOException
fileName - the file to clearshpGeoType - DOCUMENT ME!IOException - DOCUMENT ME!public static void clearDbfFile(String fileName) throws IOException
fileName - the file to clearIOException - DOCUMENT ME!Copyright © 2012–2026 cismet GmbH. All rights reserved.