Class LambertConformalConicEllipse
- java.lang.Object
-
- ucar.unidata.geoloc.ProjectionImpl
-
- ucar.unidata.geoloc.projection.proj4.LambertConformalConicEllipse
-
- All Implemented Interfaces:
Serializable
,Projection
public class LambertConformalConicEllipse extends ProjectionImpl
Adapted from com.jhlabs.map.proj.LambertConformalConicProjection- Since:
- Oct 20, 2009
- See Also:
- "http://www.jhlabs.com/java/maps/proj/index.html", "http://trac.osgeo.org/proj/", Serialized Form
-
-
Field Summary
-
Fields inherited from class ucar.unidata.geoloc.ProjectionImpl
atts, defaultMapArea, defaultUnits, EARTH_RADIUS, INDEX_LAT, INDEX_LON, INDEX_X, INDEX_Y, isLatLon, name, PI, PI_OVER_2, PI_OVER_4, TOLERANCE
-
-
Constructor Summary
Constructors Constructor Description LambertConformalConicEllipse()
Constructor with default parametersLambertConformalConicEllipse(double lat0, double lon0, double par1, double par2, double falseEasting, double falseNorthing, Earth earth)
Construct a LambertConformal Projection, two standard parellels.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProjectionImpl
constructCopy()
copy constructor - avoid clone !!boolean
crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
This returns true when the line between pt1 and pt2 crosses the seam.boolean
equals(Object o)
Returns true if this represents the same Projection as proj.Earth
getEarth()
double
getFalseEasting()
Get the false easting, in km.double
getFalseNorthing()
Get the false northing, in km.double
getOriginLat()
Get the origin latitude.double
getOriginLon()
Get the origin longitude.double
getParallelOne()
Get the first standard paralleldouble
getParallelTwo()
Get the second standard parallelString
getProjectionTypeLabel()
Get the label to be used in the gui for this type of projectionint
hashCode()
ProjectionPoint
latLonToProj(LatLonPoint latLon, ProjectionPointImpl result)
Convert a LatLonPoint to projection coordinatesString
paramsToString()
Create a String of the parameters.LatLonPoint
projToLatLon(ProjectionPoint world, LatLonPointImpl result)
Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.-
Methods inherited from class ucar.unidata.geoloc.ProjectionImpl
addParameter, addParameter, addParameter, findProjectionParameter, getClassName, getDefaultMapArea, getDefaultMapAreaLL, getDefaultUnits, getHeader, getName, getProjectionParameters, isLatLon, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProj, latLonToProjBB, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLon, projToLatLonBB, projToLatLonBBold, setDefaultMapArea, setName, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ucar.unidata.geoloc.Projection
latLonToProj, projToLatLon
-
-
-
-
Constructor Detail
-
LambertConformalConicEllipse
public LambertConformalConicEllipse()
Constructor with default parameters
-
LambertConformalConicEllipse
public LambertConformalConicEllipse(double lat0, double lon0, double par1, double par2, double falseEasting, double falseNorthing, Earth earth)
Construct a LambertConformal Projection, two standard parellels. For the one standard parellel case, set them both to the same value.- Parameters:
lat0
- lat origin of the coord. system on the projection planelon0
- lon origin of the coord. system on the projection planepar1
- standard parallel 1par2
- standard parallel 2falseEasting
- natural_x_coordinate + false_easting = x coordinate in kmfalseNorthing
- natural_y_coordinate + false_northing = y coordinate in kmearth
- shape of the earth- Throws:
IllegalArgumentException
- if lat0, par1, par2 = +/-90 deg
-
-
Method Detail
-
constructCopy
public ProjectionImpl constructCopy()
Description copied from class:ProjectionImpl
copy constructor - avoid clone !!- Specified by:
constructCopy
in classProjectionImpl
- Returns:
- a copy of this Projection. TODO return Projection in ver6
-
equals
public boolean equals(Object o)
Description copied from class:ProjectionImpl
Returns true if this represents the same Projection as proj.- Specified by:
equals
in interfaceProjection
- Specified by:
equals
in classProjectionImpl
- Parameters:
o
- projection in question- Returns:
- true if this represents the same Projection as proj.
-
getEarth
public Earth getEarth()
-
getParallelTwo
public double getParallelTwo()
Get the second standard parallel- Returns:
- the second standard parallel in degrees
-
getParallelOne
public double getParallelOne()
Get the first standard parallel- Returns:
- the first standard parallel in degrees
-
getOriginLon
public double getOriginLon()
Get the origin longitude.- Returns:
- the origin longitude in degrees
-
getOriginLat
public double getOriginLat()
Get the origin latitude.- Returns:
- the origin latitude in degrees
-
getFalseEasting
public double getFalseEasting()
Get the false easting, in km.- Returns:
- the false easting in km
-
getFalseNorthing
public double getFalseNorthing()
Get the false northing, in km.- Returns:
- the false northing in km
-
getProjectionTypeLabel
public String getProjectionTypeLabel()
Get the label to be used in the gui for this type of projection- Overrides:
getProjectionTypeLabel
in classProjectionImpl
- Returns:
- Type label
-
paramsToString
public String paramsToString()
Create a String of the parameters.- Specified by:
paramsToString
in interfaceProjection
- Specified by:
paramsToString
in classProjectionImpl
- Returns:
- a String of the parameters
-
crossSeam
public boolean crossSeam(ProjectionPoint pt1, ProjectionPoint pt2)
This returns true when the line between pt1 and pt2 crosses the seam. When the cone is flattened, the "seam" is lon0 +- 180.- Specified by:
crossSeam
in interfaceProjection
- Specified by:
crossSeam
in classProjectionImpl
- Parameters:
pt1
- point 1pt2
- point 2- Returns:
- true when the line between pt1 and pt2 crosses the seam.
-
latLonToProj
public ProjectionPoint latLonToProj(LatLonPoint latLon, ProjectionPointImpl result)
Description copied from class:ProjectionImpl
Convert a LatLonPoint to projection coordinates- Specified by:
latLonToProj
in interfaceProjection
- Specified by:
latLonToProj
in classProjectionImpl
- Parameters:
latLon
- convert from these lat, lon coordinatesresult
- the object to write to- Returns:
- the given destPoint
-
projToLatLon
public LatLonPoint projToLatLon(ProjectionPoint world, LatLonPointImpl result)
Description copied from class:ProjectionImpl
Convert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.- Specified by:
projToLatLon
in interfaceProjection
- Specified by:
projToLatLon
in classProjectionImpl
- Parameters:
world
- convert from these projection coordinatesresult
- the object to write to- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
-