public class WKTParser
extends java.lang.Object
Constructor and Description |
---|
WKTParser(java.lang.String srtext)
Creates a new instance of WKTParser.
|
Modifier and Type | Method and Description |
---|---|
static ProjectionImpl |
convertWKTToProjection(WKTParser srp)
Convert OGC spatial reference WKT to a ProjectionImpl.
|
java.lang.String |
getDatumName()
Get the datum name.
|
java.lang.String |
getGeogcsName()
Get the name of the geographic coordinate system.
|
java.lang.String |
getGeogUnitName()
Get the name of the unit that the prime meridian is expressed in.
|
double |
getGeogUnitValue()
Get the size of the unit that the prime meridian is expressed in.
|
double |
getInverseFlattening()
Get the inverse flattening.
|
double |
getMajorAxis()
Get the major axis of the spheroid.
|
double |
getParameter(java.lang.String name)
Get the value of the projection parameter.
|
java.lang.String |
getPrimeMeridianName()
Get the name of the prime meridian.
|
double |
getPrimeMeridianValue()
Return the value of prime meridian.
|
java.lang.String |
getProjectionType()
Get the name of the type of projection.
|
java.lang.String |
getProjName()
Get the name of the projection.
|
java.lang.String |
getProjUnitName()
Get the name of the projection unit.
|
double |
getProjUnitValue()
Get the projection unit value.
|
java.lang.String |
getSpheroidName()
Get the name of the spheroid.
|
boolean |
hasParameter(java.lang.String name)
Inquire if a particular projection parameter is present.
|
boolean |
isPlanarProjection()
Determine if the spatial reference text defines a planar projection,
as opposed to a Geographic coordinate system.
|
static void |
main(java.lang.String[] args) |
public WKTParser(java.lang.String srtext) throws java.text.ParseException
srtext
- The spatial reference text to be parsed.
Geocentric coordinate text is not currently supported.java.text.ParseException
- A ParseException is thrown
if the spatial reference text could not be parsed.public java.lang.String getGeogcsName()
public java.lang.String getDatumName()
public java.lang.String getSpheroidName()
public double getMajorAxis()
public double getInverseFlattening()
public java.lang.String getPrimeMeridianName()
public double getPrimeMeridianValue()
public java.lang.String getGeogUnitName()
public double getGeogUnitValue()
public boolean hasParameter(java.lang.String name)
name
- The name of the parameter. Case is ignored.public double getParameter(java.lang.String name)
name
- The name of the parameter. Case is ignored.public boolean isPlanarProjection()
public java.lang.String getProjName()
public java.lang.String getProjectionType()
public java.lang.String getProjUnitName()
public double getProjUnitValue()
public static ProjectionImpl convertWKTToProjection(WKTParser srp)
srp
- The parsed OGC WKT spatial reference text.java.text.ParseException
- If the OGIS spatial reference text was not parseable.public static void main(java.lang.String[] args) throws java.io.IOException, java.text.ParseException
java.io.IOException
java.text.ParseException