es.prodevelop.gvsig.mobile.fmap.symbol
Class FConverter

java.lang.Object
  extended byes.prodevelop.gvsig.mobile.fmap.symbol.FConverter

public class FConverter
extends java.lang.Object

Clase con varios métodos estáticos utilizados para pasar de java2d a jts y viceversa.

Author:
fjp

Field Summary
static com.vividsolutions.jts.algorithm.CGAlgorithms cga
           
static double FLATNESS
          Es la máxima distancia que permitimos que el trazo aproximado difiera del trazo real.
static com.vividsolutions.jts.geom.GeometryFactory geomFactory
          ¿QUÉ PODEMOS HACER CON LOS MULTIPOINT???
 
Constructor Summary
FConverter()
           
 
Method Summary
static java.awt.geom.Rectangle2D convertEnvelopeToRectangle2D(com.vividsolutions.jts.geom.Envelope jtsR)
           
static com.vividsolutions.jts.geom.Envelope convertRectangle2DtoEnvelope(java.awt.geom.Rectangle2D r)
           
static FPoint2D coordinate2FPoint2D(com.vividsolutions.jts.geom.Coordinate coord)
           
static IGeometry getExteriorPolygon(com.vividsolutions.jts.geom.Coordinate[] coordinates)
          Return a correct polygon (no hole)
static java.awt.Shape getExteriorPolygon(GeneralPathX gp)
           
static IGeometry getHole(com.vividsolutions.jts.geom.Coordinate[] coordinates)
          Return a hole (CCW ordered points)
static IGeometry getNotHolePolygon(FPolygon2D pol)
          Use it ONLY for NOT multipart polygons.
static boolean isCCW(FPolygon2D pol)
           
static boolean isCCW(java.awt.geom.Point2D[] points)
           
static GeneralPathX toShape(com.vividsolutions.jts.geom.Geometry geometry)
          Convierte una Geometry de JTS a GeneralPathX.
static GeneralPathX transformToInts(GeneralPathX gp, java.awt.geom.AffineTransform at)
           
static FShape transformToInts(IGeometry gp, java.awt.geom.AffineTransform at)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

geomFactory

public static final com.vividsolutions.jts.geom.GeometryFactory geomFactory
¿QUÉ PODEMOS HACER CON LOS MULTIPOINT??? => DEBERÍAMOS TRABAJAR CON UN ARRAY DE PUNTOS EN FShape.....Pensarlo bien.


cga

public static com.vividsolutions.jts.algorithm.CGAlgorithms cga

FLATNESS

public static double FLATNESS
Es la máxima distancia que permitimos que el trazo aproximado difiera del trazo real.

Constructor Detail

FConverter

public FConverter()
Method Detail

coordinate2FPoint2D

public static FPoint2D coordinate2FPoint2D(com.vividsolutions.jts.geom.Coordinate coord)
Parameters:
coord -
Returns:

toShape

public static GeneralPathX toShape(com.vividsolutions.jts.geom.Geometry geometry)
                            throws java.awt.geom.NoninvertibleTransformException
Convierte una Geometry de JTS a GeneralPathX.

Parameters:
geometry - Geometry a convertir.
Returns:
GeneralPathX.
Throws:
java.awt.geom.NoninvertibleTransformException
java.lang.IllegalArgumentException

transformToInts

public static GeneralPathX transformToInts(GeneralPathX gp,
                                           java.awt.geom.AffineTransform at)

transformToInts

public static FShape transformToInts(IGeometry gp,
                                     java.awt.geom.AffineTransform at)

convertEnvelopeToRectangle2D

public static java.awt.geom.Rectangle2D convertEnvelopeToRectangle2D(com.vividsolutions.jts.geom.Envelope jtsR)

convertRectangle2DtoEnvelope

public static com.vividsolutions.jts.geom.Envelope convertRectangle2DtoEnvelope(java.awt.geom.Rectangle2D r)

getExteriorPolygon

public static IGeometry getExteriorPolygon(com.vividsolutions.jts.geom.Coordinate[] coordinates)
Return a correct polygon (no hole)

Parameters:
coordinates -
Returns:

isCCW

public static boolean isCCW(java.awt.geom.Point2D[] points)

isCCW

public static boolean isCCW(FPolygon2D pol)

getHole

public static IGeometry getHole(com.vividsolutions.jts.geom.Coordinate[] coordinates)
Return a hole (CCW ordered points)

Parameters:
coordinates -
Returns:

getExteriorPolygon

public static java.awt.Shape getExteriorPolygon(GeneralPathX gp)

getNotHolePolygon

public static IGeometry getNotHolePolygon(FPolygon2D pol)
Use it ONLY for NOT multipart polygons.

Parameters:
pol -
Returns: