org.geotools.geometry.jts
Class GeometryCoordinateSequenceTransformer

Object
  extended by GeometryCoordinateSequenceTransformer

public class GeometryCoordinateSequenceTransformer
extends Object

Service object that takes a geometry an applies a MathTransform on top of it.

Author:
Andrea Aime
Module:
modules/library/api (gt-api.jar)

Constructor Summary
GeometryCoordinateSequenceTransformer()
           
GeometryCoordinateSequenceTransformer(CoordinateSequenceTransformer transformer)
           
 
Method Summary
 CoordinateSequence projectCoordinateSequence(CoordinateSequence cs)
           
 void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
          Sets the target coordinate reference system.
 void setMathTransform(MathTransform transform)
          Sets the math transform to be used for transformation
 Geometry transform(Geometry g)
          Applies the transform to the provided geometry, given
 LineString transformLineString(LineString ls, GeometryFactory gf)
           
 Point transformPoint(Point point, GeometryFactory gf)
           
 Polygon transformPolygon(Polygon polygon, GeometryFactory gf)
           
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryCoordinateSequenceTransformer

public GeometryCoordinateSequenceTransformer()

GeometryCoordinateSequenceTransformer

public GeometryCoordinateSequenceTransformer(CoordinateSequenceTransformer transformer)
Method Detail

setMathTransform

public void setMathTransform(MathTransform transform)
Sets the math transform to be used for transformation

Parameters:
transform -

setCoordinateReferenceSystem

public void setCoordinateReferenceSystem(CoordinateReferenceSystem crs)
Sets the target coordinate reference system.

This value is used to set the coordinate reference system of geometries after they have been transformed.

Parameters:
crs - The target coordinate reference system.

transform

public Geometry transform(Geometry g)
                   throws TransformException
Applies the transform to the provided geometry, given

Parameters:
g -
Throws:
TransformException

transformLineString

public LineString transformLineString(LineString ls,
                                      GeometryFactory gf)
                               throws TransformException
Throws:
TransformException

transformPoint

public Point transformPoint(Point point,
                            GeometryFactory gf)
                     throws TransformException
Parameters:
point -
Throws:
TransformException

projectCoordinateSequence

public CoordinateSequence projectCoordinateSequence(CoordinateSequence cs)
                                             throws TransformException
Parameters:
cs - a CoordinateSequence
Throws:
TransformException

transformPolygon

public Polygon transformPolygon(Polygon polygon,
                                GeometryFactory gf)
                         throws TransformException
Parameters:
polygon -
Throws:
TransformException


Copyright © 1996-2010 Geotools. All Rights Reserved.