Class WWUtils

java.lang.Object
repast.simphony.visualization.gis3D.WWUtils

public class WWUtils extends Object
Utilities for GIS visualization in WorldWind. The WWJ display uses a WGS84 coordinate system, so all returned objects are converted to WGS84 lat/lon degrees irrespective of the original objects CRS.
Author:
Eric Tatara
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static gov.nasa.worldwind.geom.LatLon
    CoordToLatLon(org.locationtech.jts.geom.Coordinate coord)
     
    static List<gov.nasa.worldwind.geom.LatLon>
    CoordToLatLon(org.locationtech.jts.geom.Coordinate[] coords)
    Convert a coordinate array to a list of WWJ LatLon
    static gov.nasa.worldwind.geom.Sector
    envelopeToSectorWGS84(org.geotools.geometry.jts.ReferencedEnvelope envelope)
    Create a WWJ Sector in WGS84 CRS from a GeoTools ReferencedEnvelope
    static void
    insertAfterPlacenames(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
     
    static void
    insertBeforeCompass(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
     
    static void
    insertBeforeLayerName(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer, String targetName)
     
    static void
    insertBeforePlacenames(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
     
    static org.locationtech.jts.geom.Geometry
    projectGeometry(org.locationtech.jts.geom.Geometry geom, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS)
    Projectthe given Geometry and CRS to a target CRS
    static org.locationtech.jts.geom.Geometry
    projectGeometryToWGS84(org.locationtech.jts.geom.Geometry geom, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS)
    Project the given Geometry to WGS84

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • WWUtils

      public WWUtils()
  • Method Details

    • CoordToLatLon

      public static gov.nasa.worldwind.geom.LatLon CoordToLatLon(org.locationtech.jts.geom.Coordinate coord)
    • CoordToLatLon

      public static List<gov.nasa.worldwind.geom.LatLon> CoordToLatLon(org.locationtech.jts.geom.Coordinate[] coords)
      Convert a coordinate array to a list of WWJ LatLon
      Parameters:
      coords -
      Returns:
    • projectGeometryToWGS84

      public static org.locationtech.jts.geom.Geometry projectGeometryToWGS84(org.locationtech.jts.geom.Geometry geom, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS)
      Project the given Geometry to WGS84
      Parameters:
      geom - the geometry to project
      sourceCRS - the source CRS
      Returns:
    • projectGeometry

      public static org.locationtech.jts.geom.Geometry projectGeometry(org.locationtech.jts.geom.Geometry geom, org.opengis.referencing.crs.CoordinateReferenceSystem sourceCRS, org.opengis.referencing.crs.CoordinateReferenceSystem targetCRS)
      Projectthe given Geometry and CRS to a target CRS
      Parameters:
      geom -
      sourceCRS -
      targetCRS -
      Returns:
    • envelopeToSectorWGS84

      public static gov.nasa.worldwind.geom.Sector envelopeToSectorWGS84(org.geotools.geometry.jts.ReferencedEnvelope envelope)
      Create a WWJ Sector in WGS84 CRS from a GeoTools ReferencedEnvelope
      Parameters:
      envelope - the ReferencedEnvelope in any CRS
      Returns:
      the WWJ Sector in WGS84
    • insertBeforeCompass

      public static void insertBeforeCompass(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
    • insertBeforePlacenames

      public static void insertBeforePlacenames(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
    • insertAfterPlacenames

      public static void insertAfterPlacenames(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer)
    • insertBeforeLayerName

      public static void insertBeforeLayerName(gov.nasa.worldwind.WorldWindow wwd, gov.nasa.worldwind.layers.Layer layer, String targetName)