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, 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 ProjectionImplconstructCopy()copy constructor - avoid clone !!booleancrossSeam(ProjectionPoint pt1, ProjectionPoint pt2)This returns true when the line between pt1 and pt2 crosses the seam.booleanequals(Object o)Returns true if this represents the same Projection as proj.EarthgetEarth()doublegetFalseEasting()Get the false easting, in km.doublegetFalseNorthing()Get the false northing, in km.doublegetOriginLat()Get the origin latitude.doublegetOriginLon()Get the origin longitude.doublegetParallelOne()Get the first standard paralleldoublegetParallelTwo()Get the second standard parallelStringgetProjectionTypeLabel()Get the label to be used in the gui for this type of projectioninthashCode()ProjectionPointlatLonToProj(LatLonPoint latLon, ProjectionPointImpl result)Convert a LatLonPoint to projection coordinatesStringparamsToString()Create a String of the parameters.LatLonPointprojToLatLon(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, 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:ProjectionImplcopy constructor - avoid clone !!- Specified by:
constructCopyin classProjectionImpl- Returns:
- a copy of this Projection. TODO return Projection in ver6
-
equals
public boolean equals(Object o)
Description copied from class:ProjectionImplReturns true if this represents the same Projection as proj.- Specified by:
equalsin interfaceProjection- Specified by:
equalsin 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:
getProjectionTypeLabelin classProjectionImpl- Returns:
- Type label
-
paramsToString
public String paramsToString()
Create a String of the parameters.- Specified by:
paramsToStringin interfaceProjection- Specified by:
paramsToStringin 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:
crossSeamin interfaceProjection- Specified by:
crossSeamin 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:ProjectionImplConvert a LatLonPoint to projection coordinates- Specified by:
latLonToProjin interfaceProjection- Specified by:
latLonToProjin 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:ProjectionImplConvert projection coordinates to a LatLonPoint Note: a new object is not created on each call for the return value.- Specified by:
projToLatLonin interfaceProjection- Specified by:
projToLatLonin classProjectionImpl- Parameters:
world- convert from these projection coordinatesresult- the object to write to- Returns:
- LatLonPoint convert to these lat/lon coordinates
-
-