@Immutable public abstract class AbstractProjection extends Object implements Projection
All subclasses must:
Note on "false_easting" and "fale_northing" projection parameters:
| Modifier and Type | Field and Description |
|---|---|
protected List<Parameter> |
atts |
protected static double |
EARTH_RADIUS |
protected static int |
INDEX_LAT |
protected static int |
INDEX_LON |
protected static int |
INDEX_X |
protected static int |
INDEX_Y |
protected boolean |
isLatLon |
protected String |
name |
protected static double |
PI |
protected static double |
PI_OVER_2 |
protected static double |
PI_OVER_4 |
protected static double |
TOLERANCE |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractProjection(String name,
boolean isLatLon) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParameter(Attribute att)
Add a parameter to this projection
|
protected void |
addParameter(Parameter p)
Deprecated.
use addParameter(Attribute)
|
protected void |
addParameter(String name,
double value)
Add an parameter to this projection
|
protected void |
addParameter(String name,
String value)
Add an parameter to this projection
|
abstract Projection |
constructCopy()
copy constructor - avoid clone !!
|
Parameter |
findProjectionParameter(String want)
Deprecated.
do not use
|
String |
getClassName()
The name of the implementing class.
|
static String |
getHeader()
Get a header for display.
|
protected static double |
getMinOrMaxLon(double lon1,
double lon2,
boolean wantMin) |
String |
getName()
The name of this projection.
|
AttributeContainer |
getProjectionAttributes()
Get projection parameters.
|
com.google.common.collect.ImmutableList<Parameter> |
getProjectionParameters()
Deprecated.
use getProjectionAttributes.
|
String |
getProjectionTypeLabel()
Get the label to be used in the gui for this type of projection.
|
boolean |
isLatLon()
Is this the lat/lon Projection ?
|
ProjectionRect |
latLonToProjBB(LatLonRect latlonRect)
Convert a lat/lon bounding box to a world coordinate bounding box,
by finding the minimum enclosing box.
|
abstract String |
paramsToString()
String representation of the projection parameters.
|
LatLonRect |
projToLatLonBB(ProjectionRect bb)
Compute lat/lon bounding box from projection bounding box.
|
String |
toString()
Get a String representation of this projection.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcrossSeam, latLonToProj, latLonToProj, projToLatLon, projToLatLonprotected static final double EARTH_RADIUS
protected static final int INDEX_LAT
protected static final int INDEX_LON
protected static final int INDEX_X
protected static final int INDEX_Y
protected static final double TOLERANCE
protected static final double PI
protected static final double PI_OVER_2
protected static final double PI_OVER_4
protected final String name
protected final boolean isLatLon
protected AbstractProjection(String name, boolean isLatLon)
public abstract Projection constructCopy()
public String getClassName()
ProjectiongetClassName in interface Projectionpublic abstract String paramsToString()
ProjectionparamsToString in interface Projectionpublic String getProjectionTypeLabel()
public String getName()
ProjectiongetName in interface Projection@Deprecated public com.google.common.collect.ImmutableList<Parameter> getProjectionParameters()
ProjectiongetProjectionParameters in interface Projectionpublic AttributeContainer getProjectionAttributes()
ProjectiongetProjectionAttributes in interface Projection@Deprecated public Parameter findProjectionParameter(String want)
protected void addParameter(String name, String value)
name - name of the attributevalue - parameter value as a stringprotected void addParameter(String name, double value)
name - name of the parametervalue - parameter value as a doubleprotected void addParameter(Attribute att)
@Deprecated protected void addParameter(Parameter p)
public boolean isLatLon()
isLatLon in interface Projectionpublic static String getHeader()
public String toString()
public ProjectionRect latLonToProjBB(LatLonRect latlonRect)
ProjectionlatLonToProjBB in interface ProjectionlatlonRect - input lat,lon bounding boxpublic LatLonRect projToLatLonBB(ProjectionRect bb)
ProjectionprojToLatLonBB in interface Projectionbb - projection bounding boxprotected static double getMinOrMaxLon(double lon1,
double lon2,
boolean wantMin)