ui/src/main/java/ucar/nc2/ui/gis/AbstractGisFeature.java
public Shape getProjectedShape(ProjectionImpl dataProject, ProjectionImpl displayProject) {
    ProjectionPointImpl pt1 = new ProjectionPointImpl();
    ProjectionPointImpl lastW = new ProjectionPointImpl();
    GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD, getNumPoints());

    boolean showPts = ucar.util.prefs.ui.Debug.isSet("projection/showPoints");

    java.util.Iterator pi = getGisParts();
    while (pi.hasNext()) {
      GisPart gp = (GisPart) pi.next();
      double[] xx = gp.getX();
      double[] yy = gp.getY();
      boolean skipPrev = false;
      int count = 0;
      for (int i = 0; i < gp.getNumPoints(); i++) {
        pt1.setLocation(xx[i], yy[i]);
        LatLonPoint llpt = dataProject.projToLatLon(pt1);
        ProjectionPoint pt2 = displayProject.latLonToProj(llpt);

        if (showPts) {
          System.out.println("AbstractGisFeature getProjectedShape 2 " + xx[i] + " " + yy[i] + " === " + pt2.getX() + " " + pt2.getY());
          if (displayProject.crossSeam(pt2, lastW)) System.out.println("***cross seam");
        }

        // deal with possible NaNs
         if (Double.isNaN(pt2.getX()) || Double.isNaN(pt2.getY())) {
           skipPrev = true;
           continue;
         }

        if ((count == 0) || skipPrev || displayProject.crossSeam(pt2, lastW))
          path.moveTo((float) pt2.getX(), (float) pt2.getY());
        else
          path.lineTo((float) pt2.getX(), (float) pt2.getY());
        count++;
        skipPrev = false;

        lastW.setLocation(pt2);
      }
    }
    return path;
  }
public Shape getProjectedShape(ProjectionImpl dataProject, ProjectionImpl displayProject) {
    ProjectionPointImpl pt1 = new ProjectionPointImpl();
    ProjectionPointImpl lastW = new ProjectionPointImpl();
    GeneralPath path = new GeneralPath(GeneralPath.WIND_EVEN_ODD, getNumPoints());

    boolean showPts = ucar.util.prefs.ui.Debug.isSet("projection/showPoints");

    java.util.Iterator pi = getGisParts();
    while (pi.hasNext()) {
      GisPart gp = (GisPart) pi.next();
      double[] xx = gp.getX();
      double[] yy = gp.getY();
      boolean skipPrev = false;
      int count = 0;
      for (int i = 0; i < gp.getNumPoints(); i++) {
        pt1.setLocation(xx[i], yy[i]);
        LatLonPoint llpt = dataProject.projToLatLon(pt1);
        ProjectionPoint pt2 = displayProject.latLonToProj(llpt);

        if (showPts) {
          System.out.println("AbstractGisFeature getProjectedShape 2 " + xx[i] + " " + yy[i] + " === " + pt2.getX() + " " + pt2.getY());
          if (displayProject.crossSeam(pt2, lastW)) System.out.println("***cross seam");
        }

        // deal with possible NaNs
         if (Double.isNaN(pt2.getX()) || Double.isNaN(pt2.getY())) {
           skipPrev = true;
           continue;
         }

        if ((count == 0) || skipPrev || displayProject.crossSeam(pt2, lastW))
          path.moveTo((float) pt2.getX(), (float) pt2.getY());
        else
          path.lineTo((float) pt2.getX(), (float) pt2.getY());
        count++;
        skipPrev = false;

        lastW.setLocation(pt2);
      }
    }
    return path;
  }
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).

@param dataProject    data Projection to use.
@param displayProject display Projection to use.
@return shape corresponding to this feature