public class Crs extends Object implements ICrs
Constructor and Description |
---|
Crs(int epsgCode,
int aut) |
Crs(int epsg_cod,
String code)
Construye un CRS a partir del código EPSG o de la cadena WKT.
|
Crs(int epsg_cod,
String code,
String params)
Construye un CRS a partir del código EPSG o de la cadena WKT.
|
Crs(SpatialReference spatialReference) |
Modifier and Type | Method and Description |
---|---|
void |
changeTrans(String code) |
Object |
clone()
Creates a copy of the object.
|
Point2D |
createPoint(double x,
double y) |
void |
drawGrid(Graphics2D g,
ViewPortData vp) |
boolean |
equals(Object obj) |
String |
export(String format)
Return the string representation of projection in the format.
|
Point2D |
fromGeo(Point2D gPt,
Point2D mPt) |
String |
getAbrev() |
int |
getCode()
Código del CRS
|
CrsProj |
getCrsProj() |
CrsWkt |
getCrsWkt()
Campos de la cadena wkt
|
ICoordTrans |
getCT(IProjection dest)
Crea un ICoordTrans para transformar coordenadas
desde el IProjection actual al dest.
|
IDatum |
getDatum() |
Rectangle2D |
getExtent(Rectangle2D extent,
double scale,
double wImage,
double hImage,
double mapUnits,
double distanceUnits,
double dpi) |
String |
getFullCode()
Devuelve getAbrev() mas los parametros de transformacion si los hay
ej.: (EPSG:23030:proj@+proj...@...)
|
Color |
getGridColor() |
String |
getProj4String() |
double |
getScale(double minX,
double maxX,
double width,
double dpi)
First two parameters must be in meters.
|
double |
getScale(double minX,
double maxX,
double minY,
double maxY,
double width,
double dpi) |
String |
getSourceTransformationParams()
Devuelve los parametros de la transformacion del crs fuente
|
String |
getTargetTransformationParams()
Devuelve los parametros de la transformacion del crs destino
|
String |
getTransformationParams() |
String |
getWKT()
Cadena WKT del CRS utilizado
|
int |
hashCode() |
boolean |
isProjected() |
protected void |
setAbrev(String code) |
void |
setCode(int epsg_cod) |
void |
setGridColor(Color c) |
void |
setName(String nom) |
void |
setTrans(String code) |
void |
setTransformationParams(String sourceParams,
String targetParams)
Establece los parámetros de transformación para el CRS fuente y para
el destino
|
void |
setWKT(String wkt) |
Point2D |
toGeo(Point2D pt) |
String |
toString() |
public Crs(SpatialReference spatialReference)
spatialReference
- public Crs(int epsgCode, int aut) throws CrsException
epsgCode
- aut
- CrsException
public Crs(int epsg_cod, String code) throws CrsException
epsg_cod
- code
- CrsException
public Crs(int epsg_cod, String code, String params) throws CrsException
epsg_cod
- code
- params
- CrsException
public void setTrans(String code)
code
- public void changeTrans(String code)
code
- public String getAbrev()
getAbrev
in interface IProjection
protected void setAbrev(String code)
code
- public void setName(String nom)
nom
- public IDatum getDatum()
getDatum
in interface IProjection
public void setWKT(String wkt)
wkt
- public void setTransformationParams(String sourceParams, String targetParams)
ICrs
setTransformationParams
in interface ICrs
params
- public String getSourceTransformationParams()
getSourceTransformationParams
in interface ICrs
public String getTargetTransformationParams()
getTargetTransformationParams
in interface ICrs
public String getTransformationParams()
public CrsProj getCrsProj()
getCrsProj
in interface ICrs
public Point2D createPoint(double x, double y)
createPoint
in interface IProjection
x
- y
- public void drawGrid(Graphics2D g, ViewPortData vp)
drawGrid
in interface IProjection
g
- vp
- public void setGridColor(Color c)
setGridColor
in interface IProjection
c
- public Color getGridColor()
getGridColor
in interface IProjection
public ICoordTrans getCT(IProjection dest)
IProjection
getCT
in interface IProjection
dest
- public Point2D toGeo(Point2D pt)
toGeo
in interface IProjection
pt
- public Point2D fromGeo(Point2D gPt, Point2D mPt)
fromGeo
in interface IProjection
gPt
- mPt
- public boolean isProjected()
isProjected
in interface IProjection
public double getScale(double minX, double maxX, double width, double dpi)
IProjection
getScale
in interface IProjection
minX
- maxX
- width
- dpi
- public double getScale(double minX, double maxX, double minY, double maxY, double width, double dpi)
minX
- maxX
- minY
- maxY
- width
- dpi
- public void setCode(int epsg_cod)
epsg_cod
- public int getCode()
ICrs
public String getFullCode()
IProjection
getFullCode
in interface IProjection
public Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits, double distanceUnits, double dpi)
getExtent
in interface IProjection
public String getProj4String() throws CrsException
getProj4String
in interface ICrs
CrsException
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public String export(String format)
IProjection
export
in interface IProjection