Package ucar.nc2.ui.gis
Class AbstractGisFeature
- java.lang.Object
-
- ucar.nc2.ui.gis.AbstractGisFeature
-
- All Implemented Interfaces:
GisFeature
- Direct Known Subclasses:
ContourFeature,EsriShapefile.EsriFeature,GisFeatureAdapter
public abstract class AbstractGisFeature extends Object implements GisFeature
Abstract class that implements common methods for concrete implementations of GisFeature.
-
-
Constructor Summary
Constructors Constructor Description AbstractGisFeature()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Rectangle2DgetBounds2D()Get the bounding box for this feature.abstract IteratorgetGisParts()Get the parts of this feature, in the form of an iterator.abstract intgetNumParts()Get number of parts comprising this feature.abstract intgetNumPoints()Get total number of points in all parts of this feature.ShapegetProjectedShape(ucar.unidata.geoloc.ProjectionImpl dataProject, ucar.unidata.geoloc.ProjectionImpl displayProject)Convert this GisFeature to a java.awt.Shape.ShapegetShape()Convert this GisFeature to a java.awt.Shape, using the default coordinate system, mapping gisFeature(x,y) -> screen(x,y).
-
-
-
Method Detail
-
getBounds2D
public abstract Rectangle2D getBounds2D()
Description copied from interface:GisFeatureGet the bounding box for this feature.- Specified by:
getBounds2Din interfaceGisFeature- Returns:
- rectangle bounding this feature
-
getNumPoints
public abstract int getNumPoints()
Description copied from interface:GisFeatureGet total number of points in all parts of this feature.- Specified by:
getNumPointsin interfaceGisFeature- Returns:
- total number of points in all parts of this feature.
-
getNumParts
public abstract int getNumParts()
Description copied from interface:GisFeatureGet number of parts comprising this feature.- Specified by:
getNumPartsin interfaceGisFeature- Returns:
- number of parts comprising this feature.
-
getGisParts
public abstract Iterator getGisParts()
Description copied from interface:GisFeatureGet the parts of this feature, in the form of an iterator.- Specified by:
getGisPartsin interfaceGisFeature- Returns:
- the iterator over the parts of this feature. Each part is a GisPart.
-
getShape
public Shape getShape()
Convert this GisFeature to a java.awt.Shape, using the default coordinate system, mapping gisFeature(x,y) -> screen(x,y). LOOK STILL HAVE TO crossSeam()- Returns:
- shape corresponding to this feature.
-
getProjectedShape
public Shape getProjectedShape(ucar.unidata.geoloc.ProjectionImpl dataProject, ucar.unidata.geoloc.ProjectionImpl displayProject)
Convert this GisFeature to a java.awt.Shape. The data coordinate system is in the coordinates of dataProject, and the screen is in the coordinates of displayProject. So: displayProject.latLonToProj( dataProject.projToLatLon(gisFeature(x,y))) -> screen(x,y).- Parameters:
dataProject- data Projection to use.displayProject- display Projection to use.- Returns:
- shape corresponding to this feature
-
-