Class AbstractGisFeature

java.lang.Object
ucar.unidata.gis.AbstractGisFeature
All Implemented Interfaces:
GisFeature
Direct Known Subclasses:
EsriShapefile.EsriFeature, GisFeatureAdapter

public abstract class AbstractGisFeature extends Object implements GisFeature
Abstract class that implements common methods for concrete implementations of GisFeature.
Version:
$Id: AbstractGisFeature.java,v 1.19 2006/08/22 19:57:07 dmurray Exp $
Author:
Russ Rew, John Caron
  • Constructor Details

    • AbstractGisFeature

      public AbstractGisFeature()
  • Method Details

    • getBounds2D

      public abstract Rectangle2D getBounds2D()
      _more_
      Specified by:
      getBounds2D in interface GisFeature
      Returns:
      _more_
    • getNumPoints

      public abstract int getNumPoints()
      _more_
      Specified by:
      getNumPoints in interface GisFeature
      Returns:
      _more_
    • getNumParts

      public abstract int getNumParts()
      _more_
      Specified by:
      getNumParts in interface GisFeature
      Returns:
      _more_
    • getGisParts

      public abstract Iterator getGisParts()
      _more_
      Specified by:
      getGisParts in interface GisFeature
      Returns:
      _more_
    • 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 displayProject)
      Convert this GisFeature to a java.awt.Shape. The data coordinate system is assumed to be (lat, lon), use the projection to transform points, so project.latLonToProj(gisFeature(x,y)) -> screen(x,y).
      Parameters:
      displayProject - Projection to use.
      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
    • getPointCount

      public int getPointCount()
    • getMapLines

      public SampledSet getMapLines()
      Convert a GisFeature to a visad.SampledSet, which is either a single Gridded2DSet (if there is only one part to the feature) or a UnionSet of Gridded2DSet (if there are multiple parts). Each Gridded2DSet is a sequence of line segments that is supposed to be drawn as a continuous line.
      Returns:
      UnionSet of Gridded2DSet corresponding to this feature.
    • getMapLines

      public SampledSet getMapLines(Rectangle2D bbox)
      Convert a GisFeature to a visad.SampledSet, which is either a single Gridded2DSet (if there is only one part to the feature) or a UnionSet of Gridded2DSet (if there are multiple parts). Each Gridded2DSet is a sequence of line segments that is supposed to be drawn as a continuous line.
      Returns:
      UnionSet of Gridded2DSet corresponding to this feature.