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 Rectangle2D
getBounds2D()
Get the bounding box for this feature.abstract Iterator
getGisParts()
Get the parts of this feature, in the form of an iterator.abstract int
getNumParts()
Get number of parts comprising this feature.abstract int
getNumPoints()
Get total number of points in all parts of this feature.Shape
getProjectedShape(ProjectionImpl dataProject, ProjectionImpl displayProject)
Convert this GisFeature to a java.awt.Shape.Shape
getShape()
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:GisFeature
Get the bounding box for this feature.- Specified by:
getBounds2D
in interfaceGisFeature
- Returns:
- rectangle bounding this feature
-
getNumPoints
public abstract int getNumPoints()
Description copied from interface:GisFeature
Get total number of points in all parts of this feature.- Specified by:
getNumPoints
in interfaceGisFeature
- Returns:
- total number of points in all parts of this feature.
-
getNumParts
public abstract int getNumParts()
Description copied from interface:GisFeature
Get number of parts comprising this feature.- Specified by:
getNumParts
in interfaceGisFeature
- Returns:
- number of parts comprising this feature.
-
getGisParts
public abstract Iterator getGisParts()
Description copied from interface:GisFeature
Get the parts of this feature, in the form of an iterator.- Specified by:
getGisParts
in 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(ProjectionImpl dataProject, 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
-
-