public class GeometryTransformUtils extends Object
| Constructor and Description |
|---|
GeometryTransformUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static org.osgeo.proj4j.ProjCoordinate[] |
convert(org.locationtech.jts.geom.Coordinate[] jtsCoords)
Convert JTS coordinates to proj4j coordinates.
|
protected static org.locationtech.jts.geom.Coordinate[] |
convert(org.osgeo.proj4j.ProjCoordinate[] projCoords)
Convert proj4 coordinates to JTS coordinates.
|
static boolean |
isLatLong(CommandContext ctx,
int srid) |
static String |
lookupProj4Text(CommandContext ctx,
int srid)
Lookup proj4 parameters in SPATIAL_REF_SYS using SRID as key.
|
static GeometryType |
transform(CommandContext ctx,
GeometryType geom,
int srid)
Convert geometry to a different coordinate system.
|
static org.locationtech.jts.geom.Geometry |
transform(org.locationtech.jts.geom.Geometry geom,
String srcParams,
String tgtParams)
Convert geometry to different coordinate system given the source/target
proj4 parameters.
|
protected static org.locationtech.jts.geom.Coordinate[] |
transformCoordinates(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Coordinate[] in) |
protected static org.osgeo.proj4j.ProjCoordinate[] |
transformCoordinates(org.osgeo.proj4j.CoordinateTransform ct,
org.osgeo.proj4j.ProjCoordinate[] in) |
protected static org.locationtech.jts.geom.Geometry |
transformGeometry(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Geometry geom) |
protected static org.locationtech.jts.geom.Geometry |
transformGeometryCollection(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.GeometryCollection geometryCollection) |
protected static org.locationtech.jts.geom.Geometry |
transformLinearRing(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.LinearRing linearRing) |
protected static org.locationtech.jts.geom.Geometry |
transformLineString(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.LineString lineString) |
protected static org.locationtech.jts.geom.Geometry |
transformMultiLineString(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiLineString multiLineString) |
protected static org.locationtech.jts.geom.Geometry |
transformMultiPoint(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiPoint multiPoint) |
protected static org.locationtech.jts.geom.Geometry |
transformMultiPolygon(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiPolygon multiPolygon) |
protected static org.locationtech.jts.geom.Geometry |
transformPoint(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Point point) |
protected static org.locationtech.jts.geom.Polygon |
transformPolygon(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Polygon polygon) |
@TeiidFunction(name="st_transform", category="Geometry", nullOnNull=true, pushdown=CAN_PUSHDOWN) public static GeometryType transform(CommandContext ctx, GeometryType geom, int srid) throws FunctionExecutionException
ctx - Command context used to lookup proj4 parameters from table.geom - Geometry to transform.srid - Target SRID; must exist in SPATIAL_REF_SYS table.FunctionExecutionExceptionpublic static String lookupProj4Text(CommandContext ctx, int srid) throws FunctionExecutionException
ctx - srid - FunctionExecutionExceptionpublic static boolean isLatLong(CommandContext ctx, int srid) throws FunctionExecutionException
FunctionExecutionExceptionpublic static org.locationtech.jts.geom.Geometry transform(org.locationtech.jts.geom.Geometry geom,
String srcParams,
String tgtParams)
throws FunctionExecutionException
geom - srcParams - tgtParams - FunctionExecutionExceptionprotected static org.locationtech.jts.geom.Geometry transformGeometry(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Geometry geom)
throws FunctionExecutionException
FunctionExecutionExceptionprotected static org.locationtech.jts.geom.Coordinate[] convert(org.osgeo.proj4j.ProjCoordinate[] projCoords)
projCoords - protected static org.osgeo.proj4j.ProjCoordinate[] convert(org.locationtech.jts.geom.Coordinate[] jtsCoords)
jtsCoords - protected static org.locationtech.jts.geom.Coordinate[] transformCoordinates(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Coordinate[] in)
protected static org.osgeo.proj4j.ProjCoordinate[] transformCoordinates(org.osgeo.proj4j.CoordinateTransform ct,
org.osgeo.proj4j.ProjCoordinate[] in)
protected static org.locationtech.jts.geom.Polygon transformPolygon(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Polygon polygon)
protected static org.locationtech.jts.geom.Geometry transformPoint(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.Point point)
protected static org.locationtech.jts.geom.Geometry transformLinearRing(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.LinearRing linearRing)
protected static org.locationtech.jts.geom.Geometry transformLineString(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.LineString lineString)
protected static org.locationtech.jts.geom.Geometry transformMultiPolygon(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiPolygon multiPolygon)
protected static org.locationtech.jts.geom.Geometry transformMultiPoint(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiPoint multiPoint)
protected static org.locationtech.jts.geom.Geometry transformMultiLineString(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.MultiLineString multiLineString)
protected static org.locationtech.jts.geom.Geometry transformGeometryCollection(org.osgeo.proj4j.CoordinateTransform ct,
org.locationtech.jts.geom.GeometryCollection geometryCollection)
throws FunctionExecutionException
FunctionExecutionExceptionCopyright © 2019. All rights reserved.