Class UTMFinder


  • public class UTMFinder
    extends Object
    Finds the UTM CRS appropriate to a specified lon, lat location.
    Author:
    Michelle Kelherer
    • Constructor Summary

      Constructors 
      Constructor Description
      UTMFinder()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static short determineZone​(double lat, double lon)
      Determine the zone for the given lat/lon
      static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMfor​(double lat, double lon)
      Gets the UTM CRS for the specified lat and lon.
      static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMfor​(short zone)  
      static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMFor​(org.locationtech.jts.geom.Geometry geom, org.opengis.referencing.crs.CoordinateReferenceSystem crs)
      Gets the UTM appropriate for the specified geometry in the specified CoordinateReferenceSystem.
    • Constructor Detail

      • UTMFinder

        public UTMFinder()
    • Method Detail

      • determineZone

        public static short determineZone​(double lat,
                                          double lon)
        Determine the zone for the given lat/lon
        Parameters:
        lat - The Latitude
        lon - The Longitude
        Returns:
        The zone
      • getUTMFor

        public static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMFor​(org.locationtech.jts.geom.Geometry geom,
                                                                                      org.opengis.referencing.crs.CoordinateReferenceSystem crs)
        Gets the UTM appropriate for the specified geometry in the specified CoordinateReferenceSystem. The UTM will be for the coordinate that is returned by geom.getCoordinate().
        Parameters:
        geom - the geometry
        crs - the geometry's coordinate reference system
        Returns:
        the appropriate UTM.
      • getUTMfor

        public static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMfor​(double lat,
                                                                                      double lon)
        Gets the UTM CRS for the specified lat and lon.
        Parameters:
        lat - the latitude
        lon - the longitude
        Returns:
        Gets the UTM CRS for the specified lat and lon.
      • getUTMfor

        public static org.opengis.referencing.crs.CoordinateReferenceSystem getUTMfor​(short zone)