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 - CrsExceptionpublic Crs(int epsg_cod, String code) throws CrsException
epsg_cod - code - CrsExceptionpublic Crs(int epsg_cod, String code, String params) throws CrsException
epsg_cod - code - params - CrsExceptionpublic void setTrans(String code)
code - public void changeTrans(String code)
code - public String getAbrev()
getAbrev in interface IProjectionprotected void setAbrev(String code)
code - public void setName(String nom)
nom - public IDatum getDatum()
getDatum in interface IProjectionpublic void setWKT(String wkt)
wkt - public void setTransformationParams(String sourceParams, String targetParams)
ICrssetTransformationParams in interface ICrsparams - public String getSourceTransformationParams()
getSourceTransformationParams in interface ICrspublic String getTargetTransformationParams()
getTargetTransformationParams in interface ICrspublic String getTransformationParams()
public CrsProj getCrsProj()
getCrsProj in interface ICrspublic Point2D createPoint(double x, double y)
createPoint in interface IProjectionx - y - public void drawGrid(Graphics2D g, ViewPortData vp)
drawGrid in interface IProjectiong - vp - public void setGridColor(Color c)
setGridColor in interface IProjectionc - public Color getGridColor()
getGridColor in interface IProjectionpublic ICoordTrans getCT(IProjection dest)
IProjectiongetCT in interface IProjectiondest - public Point2D toGeo(Point2D pt)
toGeo in interface IProjectionpt - public Point2D fromGeo(Point2D gPt, Point2D mPt)
fromGeo in interface IProjectiongPt - mPt - public boolean isProjected()
isProjected in interface IProjectionpublic double getScale(double minX,
double maxX,
double width,
double dpi)
IProjectiongetScale in interface IProjectionminX - 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()
ICrspublic String getFullCode()
IProjectiongetFullCode in interface IProjectionpublic Rectangle2D getExtent(Rectangle2D extent, double scale, double wImage, double hImage, double mapUnits, double distanceUnits, double dpi)
getExtent in interface IProjectionpublic String getProj4String() throws CrsException
getProj4String in interface ICrsCrsExceptionpublic Object clone() throws CloneNotSupportedException
Cloneableclone in class ObjectCloneNotSupportedException - 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)
IProjectionexport in interface IProjection