com.metsci.glimpse.charts.shoreline
Class LandShape

java.lang.Object
  extended by 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;
}
}


Nested Class Summary
static interface LandShape.VertexConverter
           
 
Constructor Summary
LandShape(java.util.List<LandSegment> segments, LandBox box)
           
 
Method Summary
 java.awt.Shape getFillShape(LandShape.VertexConverter converter)
           
 LandBox getLandBox()
           
 LatLonGeo getNeCorner()
           
 java.util.List<LandSegment> getSegments()
           
 java.awt.Shape getStrokeShape(LandShape.VertexConverter converter)
           
 LatLonGeo getSwCorner()
           
 boolean isLand(double latDeg, double lonDeg)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LandShape

public LandShape(java.util.List<LandSegment> segments,
                 LandBox box)
Method Detail

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.