Package org.locationtech.proj4j.datum
Class Grid
- java.lang.Object
-
- org.locationtech.proj4j.datum.Grid
-
- All Implemented Interfaces:
java.io.Serializable
public final class Grid extends java.lang.Object implements java.io.Serializable
A Grid represents a geodetic datum defining some mapping between a coordinate system referenced to the surface of the earth and spherical coordinates. Generally Grids are loaded from definition files in the proj4 resource directory.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Grid.ConversionTable
-
Field Summary
Fields Modifier and Type Field Description private Grid
child
private java.lang.String
fileName
URI for accessing the grid definition fileprivate java.lang.String
format
File format of the grid definition file, ie "ctable", "ntv1", "ntv2" or "missing"private java.lang.String
gridName
Identifying name for this Grid.private int
gridOffset
(package private) static int
MAX_TRY
private Grid
next
(package private) Grid.ConversionTable
table
(package private) static double
TOL
-
Constructor Summary
Constructors Constructor Description Grid()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object that)
static java.util.List<Grid>
fromNadGrids(java.lang.String grids)
private static Grid
gridinfoInit(java.lang.String gridName)
int
hashCode()
static void
mergeGridFile(java.lang.String name, java.util.List<Grid> gridList)
Merge (append) a named grid into the given gridlist.private static PolarCoordinate
nad_cvt(PolarCoordinate in, boolean inverse, Grid.ConversionTable table)
private static PolarCoordinate
nad_intr(PolarCoordinate t, Grid.ConversionTable table)
private static java.io.DataInputStream
resolveGridDefinition(java.lang.String gridName)
static void
shift(java.util.List<Grid> grids, boolean inverse, ProjCoordinate in)
Convert between this grid and WGS84, or vice versa if theinverse
flag is set.java.lang.String
toString()
-
-
-
Field Detail
-
gridName
private java.lang.String gridName
Identifying name for this Grid. eg "conus" or ntv2_0.gsb
-
fileName
private java.lang.String fileName
URI for accessing the grid definition file
-
format
private java.lang.String format
File format of the grid definition file, ie "ctable", "ntv1", "ntv2" or "missing"
-
gridOffset
private int gridOffset
-
MAX_TRY
static final int MAX_TRY
- See Also:
- Constant Field Values
-
TOL
static final double TOL
- See Also:
- Constant Field Values
-
table
Grid.ConversionTable table
-
next
private Grid next
-
child
private Grid child
-
-
Method Detail
-
mergeGridFile
public static void mergeGridFile(java.lang.String name, java.util.List<Grid> gridList) throws java.io.IOException
Merge (append) a named grid into the given gridlist.- Throws:
java.io.IOException
-
shift
public static void shift(java.util.List<Grid> grids, boolean inverse, ProjCoordinate in)
Convert between this grid and WGS84, or vice versa if theinverse
flag is set.
-
nad_cvt
private static PolarCoordinate nad_cvt(PolarCoordinate in, boolean inverse, Grid.ConversionTable table)
-
nad_intr
private static PolarCoordinate nad_intr(PolarCoordinate t, Grid.ConversionTable table)
-
fromNadGrids
public static java.util.List<Grid> fromNadGrids(java.lang.String grids) throws java.io.IOException
- Throws:
java.io.IOException
-
gridinfoInit
private static Grid gridinfoInit(java.lang.String gridName) throws java.io.IOException
- Throws:
java.io.IOException
-
resolveGridDefinition
private static java.io.DataInputStream resolveGridDefinition(java.lang.String gridName) throws java.io.IOException
- Throws:
java.io.IOException
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-