|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectschmitzm.geotools.JTSUtil
public class JTSUtil
Diese Klasse enthaelt allgemeine Funktionen fuer die Arbeit mit den in Geotools verwendeten JTS-Komponenten vereinfacht.
Constructor Summary | |
---|---|
JTSUtil()
|
Method Summary | |
---|---|
static Envelope |
createEnvelope(org.opengis.geometry.Envelope envelope)
Created an (CRS-less) JTS-Envelope from an OpenGIS-Envelope. |
static Envelope |
fixAspectRatio(Rectangle rect,
Envelope mapArea,
boolean grow)
Returns an Envelope that has the same aspect ratio as the given rectangle |
static Coordinate |
transformCoordinate(Coordinate sourceCoord,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem destCRS)
Transformiert eine Koordinate von einem CRS in ein anderes. |
static Envelope |
transformEnvelope(Envelope sourceEnv,
CoordinateReferenceSystem sourceCRS,
CoordinateReferenceSystem destCRS)
Transformiert einen JTS-Envelope von einem CRS in ein anderes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTSUtil()
Method Detail |
---|
public static Envelope fixAspectRatio(Rectangle rect, Envelope mapArea, boolean grow)
Envelope
that has the same aspect ratio as the given rectangle
rect
- defines the aspect ratio the map area is fixed with (e.g. a
gui components size)mapArea
- the map area to apply the aspect ratio of "r" togrow
- If true
, than the area will be enlarged to match
the aspect ratio. If false
, it will only shrink.public static Envelope createEnvelope(org.opengis.geometry.Envelope envelope)
envelope
- an OpenGIS-Envelope
public static Envelope transformEnvelope(Envelope sourceEnv, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem destCRS)
sourceEnv
- JTS-EnvelopesourceCRS
- CRS von sourceEnv
destCRS
- CRS in das umgerechnet werden sollCRS#findMathTransform(CoordinateReferenceSystem,CoordinateReferenceSystem)
,
JTS#transform(Envelope,MathTransform)
public static Coordinate transformCoordinate(Coordinate sourceCoord, CoordinateReferenceSystem sourceCRS, CoordinateReferenceSystem destCRS)
sourceCoord
- KoordinatesourceCRS
- CRS von sourceCoord
destCRS
- CRS in das umgerechnet werden sollCRS#findMathTransform(CoordinateReferenceSystem,CoordinateReferenceSystem)
,
JTS#transform(Coordinate, Coordinate, MathTransform)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |