com.metsci.glimpse.charts.shoreline
Class LandShape
java.lang.Object
com.metsci.glimpse.charts.shoreline.LandShape
public class LandShape
- extends java.lang.Object
Representation of land (shoreline).
Note: LandShape is typically created from a LandFile by calling the toShape() method. This
shape is often cached using a LandManager class which allows the filename to be specified
as a parameter and then loads the file to create the LandShape in a static initializer. An
example is shown below:
public class SampleLandManager
{
private static final Params PARAMS = SampleLandManager.getParams();
private static final String landFile = PARAMS.getValue(new StringParam("landFile", ""));
private static final LandShape landShape;
static
{
if (!landFile.isEmpty())
{
landShape = (new NgdcFile(new File(landFilename))).toShape();
}
else
{
landShape = null;
}
}
public static LandShape getLandShape()
{
return landShape;
}
}
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LandShape
public LandShape(java.util.List<LandSegment> segments,
LandBox box)
isLand
public boolean isLand(double latDeg,
double lonDeg)
getStrokeShape
public java.awt.Shape getStrokeShape(LandShape.VertexConverter converter)
getFillShape
public java.awt.Shape getFillShape(LandShape.VertexConverter converter)
getSwCorner
public LatLonGeo getSwCorner()
getNeCorner
public LatLonGeo getNeCorner()
getSegments
public java.util.List<LandSegment> getSegments()
getLandBox
public LandBox getLandBox()
Copyright © 2012 Metron, Inc.. All Rights Reserved.