public class IlvMGRSGridZone extends IlvLatLonRectangleGridZone
Modifier and Type | Class and Description |
---|---|
static class |
IlvMGRSGridZone.InvalidGridZone
Exception thrown when creating an invalid grid zone (wrong band or zone number).
|
Modifier and Type | Field and Description |
---|---|
protected static String |
alphabetpolex
Sequence of letters to be used for the horizontal identification letter of 100k meter polar zones.
|
protected static String |
alphabetpoley
Sequence of letters to be used for the vertical identification letter of 100k meter polar zones.
|
protected static String |
alphabetx
Sequence of letters to be used for the horizontal identification letter of 100k meter UTM zones.
|
protected static String |
alphabety
Sequence of letters to be used for the vertical identification letter of 100k meter zones.
|
Constructor and Description |
---|
IlvMGRSGridZone(IlvInputStream stream)
Creates a grid zone by reading parameters from the stream.
|
IlvMGRSGridZone(int zone,
char band)
Creates a UTM or stereographic MGRS grid zone.
|
Modifier and Type | Method and Description |
---|---|
static void |
addAllZones(IlvMGRSGrid grid)
Adds grid zones from A to Z, 1 to 60.
|
static void |
addZones(IlvMGRSGrid grid,
char minBand,
char maxBand,
int minZone,
int maxZone)
Creates and adds the Grid Zones into the grid.
|
char |
getBand()
Returns the band of the grid zone.
|
static String |
getIdentification(int zone,
char band,
double x,
double y)
Computes the 2 letter identification of the 100k meter zone for the specified coordinates.
|
IlvProjection |
getProjection()
Computes the projection to be used for this grid zone.
|
String |
getSubgridIdentification(double x,
double y)
Returns the identification (displayed in grid center) of the grid subzone.
|
int |
getZone()
Returns The zone (1 to 60) of the grid zone.
|
String |
toString()
Returns Either the zone/band identification of this grid zone for UTM, or a single letter for UPS.
|
void |
write(IlvOutputStream stream)
Writes the attributes of the zone.
|
protected static final String alphabety
protected static final String alphabetpolex
protected static final String alphabetpoley
protected static final String alphabetx
public IlvMGRSGridZone(int zone, char band) throws IlvMGRSGridZone.InvalidGridZone
zone
- MGRS zone (from 1 to 60).band
- MGRS band (from 'A' to 'Z').IlvMGRSGridZone.InvalidGridZone
- if the band or zone is invalid (for example, there can be no X32 zone).public IlvMGRSGridZone(IlvInputStream stream) throws IlvReadFileException
stream
- Stream to read from.IlvReadFileException
public static void addZones(IlvMGRSGrid grid, char minBand, char maxBand, int minZone, int maxZone)
grid
- grid to add the zones into.minBand
- The first MGRS band (between 'A' and 'Z') created.maxBand
- The last MGRS band (between 'A' and 'Z') created.minZone
- The first valid MGRS zone (between 1 and 60) created.maxZone
- The last valid MGRS zone (between 1 and 60) created.public static void addAllZones(IlvMGRSGrid grid)
grid
- grid to add zones into.public char getBand()
public IlvProjection getProjection()
Projection: Transverse Mercator in zones 6 degrees wide. Ellipsoid: the ellipsoid specified at construction. Longitude of Origin: Central meridian (CM) of each projection zone. Latitude of Origin: 0 degrees (the Equator). Unit: Meters. False Northing: 0 meters at the Equator for the Northern Hemisphere; 10,000,000 meters at the Equator for the Southern Hemisphere. False Easting: 500,000 meters at the CM of each zone. Scale Factor at the Central Meridian: 0.9996.
Projection: Polar Stereographic. Ellipsoid: World Geodetic System 1984 Longitude of Origin: 0 degrees and 180 degrees E-W. Latitude of Origin: 90 degrees N and 90 degrees S. Unit: Meter. False Northing: 2,000,000 meters. False Easting: 2,000,000 meters. Scale Factor at the Origin: 0.994.
public int getZone()
public String toString()
toString
in class Object
Object.toString()
public void write(IlvOutputStream stream) throws IOException
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.IlvPersistentObject.write(ilog.views.io.IlvOutputStream)
public String getSubgridIdentification(double x, double y)
x
- Projected x coordinate of subgrid center.y
- Projected y coordinate of subgrid center.IlvGridZone.getSubgridIdentification(double, double)
public static String getIdentification(int zone, char band, double x, double y)
zone
- Grid zone number.band
- Grid zone band.x
- Projected x coordinate.y
- Projected y coordinate.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.