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.SerializableA 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 classGrid.ConversionTable
-
Field Summary
Fields Modifier and Type Field Description private Gridchildprivate java.lang.StringfileNameURI for accessing the grid definition fileprivate java.lang.StringformatFile format of the grid definition file, ie "ctable", "ntv1", "ntv2" or "missing"private java.lang.StringgridNameIdentifying name for this Grid.private intgridOffset(package private) static intMAX_TRYprivate Gridnext(package private) Grid.ConversionTabletable(package private) static doubleTOL
-
Constructor Summary
Constructors Constructor Description Grid()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object that)static java.util.List<Grid>fromNadGrids(java.lang.String grids)private static GridgridinfoInit(java.lang.String gridName)inthashCode()static voidmergeGridFile(java.lang.String name, java.util.List<Grid> gridList)Merge (append) a named grid into the given gridlist.private static PolarCoordinatenad_cvt(PolarCoordinate in, boolean inverse, Grid.ConversionTable table)private static PolarCoordinatenad_intr(PolarCoordinate t, Grid.ConversionTable table)private static java.io.DataInputStreamresolveGridDefinition(java.lang.String gridName)static voidshift(java.util.List<Grid> grids, boolean inverse, ProjCoordinate in)Convert between this grid and WGS84, or vice versa if theinverseflag is set.java.lang.StringtoString()
-
-
-
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.IOExceptionMerge (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 theinverseflag 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object that)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-