|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deegree.cs.configuration.wkt.WKTParser
public class WKTParser
The WKTParser
class instantiates the Coordinate System given in a file, in WKT (Well Known Text) format.
The extendend Backus-Naur grammar of WKT as well as a detailed reference are available at the OGC website.
Constructor Summary | |
---|---|
WKTParser(java.io.File fileName)
|
|
WKTParser(java.lang.String fileName)
Constructor |
Method Summary | |
---|---|
protected boolean |
equalsParameterVariants(java.lang.String candidate,
java.lang.String paramName)
|
protected java.lang.String |
makeInvariantKey(java.lang.String candidate)
|
static CoordinateSystem |
parse(java.lang.String wkt)
|
protected CRSCodeType |
parseAuthority()
|
protected Axis |
parseAxis()
|
protected CompoundCRS |
parseCompoundCRS()
Parses a CompoundCRS from the current WKT location. |
CoordinateSystem |
parseCoordinateSystem()
|
protected Ellipsoid |
parseEllipsoid()
|
protected GeocentricCRS |
parseGeocentricCRS()
|
protected GeodeticDatum |
parseGeodeticDatum()
|
protected GeographicCRS |
parseGeographiCRS()
|
protected Helmert |
parseHelmert()
|
protected PrimeMeridian |
parsePrimeMeridian()
|
protected ProjectedCRS |
parseProjectedCRS()
|
protected java.lang.String |
parseString()
|
protected Unit |
parseUnit()
|
protected VerticalCRS |
parseVerticalCRS()
|
protected VerticalDatum |
parseVerticalDatum()
|
protected void |
passOverChar(char ch)
Walk a character (comma or round/square bracket). |
protected void |
passOverClosingBracket()
Walk a closing bracket (round or square). |
protected void |
passOverOpeningBracket()
Walk an opening bracket (round or square). |
protected void |
passOverWord(java.lang.String s)
Walk a WKT keyword element (e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WKTParser(java.lang.String fileName) throws java.io.IOException
fileName
- the file that contains a Coordinate System definition
java.io.IOException
- if the provided WKT has a syntax errorpublic WKTParser(java.io.File fileName) throws java.io.FileNotFoundException
fileName
- to read a wkt from.
java.io.FileNotFoundException
Method Detail |
---|
protected boolean equalsParameterVariants(java.lang.String candidate, java.lang.String paramName)
candidate
- paramName
-
protected java.lang.String makeInvariantKey(java.lang.String candidate)
protected void passOverChar(char ch) throws java.io.IOException
ch
-
java.io.IOException
- if an I/O error occurs.
WKTParsingException
- if the expected character is not present at this position.protected void passOverOpeningBracket() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
WKTParsingException
- if the opening bracket is not present at this position.protected void passOverClosingBracket() throws java.io.IOException
java.io.IOException
- if an I/O error occurs.
WKTParsingException
- if the closing bracket is not present at this position.protected void passOverWord(java.lang.String s) throws java.io.IOException
s
- the keyword element as a String
java.io.IOException
- if an I/O error occurs.
WKTParsingException
- if the keyword is not present at this position.protected CRSCodeType parseAuthority() throws java.io.IOException
java.io.IOException
- if an I/O error occursprotected java.lang.String parseString() throws java.io.IOException
java.io.IOException
- if an I/O error occurs
WKTParsingException
- if the string does not begin with have an opening double-quote.protected Axis parseAxis() throws java.io.IOException
java.io.IOException
WKTParsingException
- if the axis orientation is not one of the values defined in the WKT reference ( NORTH | SOUTH | WEST
| EAST | UP | DOWN | OTHER )protected Unit parseUnit() throws java.io.IOException
java.io.IOException
UnknownUnitException
- if the unit name does not match any of the predefined units in the APIprotected PrimeMeridian parsePrimeMeridian() throws java.io.IOException
java.io.IOException
protected Ellipsoid parseEllipsoid() throws java.io.IOException
java.io.IOException
protected Helmert parseHelmert() throws java.io.IOException
java.io.IOException
protected GeodeticDatum parseGeodeticDatum() throws java.io.IOException
java.io.IOException
protected VerticalDatum parseVerticalDatum() throws java.io.IOException
java.io.IOException
protected VerticalCRS parseVerticalCRS() throws java.io.IOException
VerticalCRS
parsed from the current reader position.
java.io.IOException
protected GeocentricCRS parseGeocentricCRS() throws java.io.IOException
GeocentricCRS
parsed from the current reader position.
java.io.IOException
protected GeographicCRS parseGeographiCRS() throws java.io.IOException
GeographicCRS
parsed from the current reader position.
java.io.IOException
protected ProjectedCRS parseProjectedCRS() throws java.io.IOException
ProjectedCRS
parsed from the current reader position.
java.io.IOException
protected CompoundCRS parseCompoundCRS() throws java.io.IOException
CompoundCRS
from the current WKT location.
CompoundCRS
parsed from the current reader position.
java.io.IOException
public CoordinateSystem parseCoordinateSystem() throws java.io.IOException
java.io.IOException
- if the provided WKT has a syntax errorpublic static CoordinateSystem parse(java.lang.String wkt) throws java.io.IOException
wkt
- the wkt code as a String
CoordinateSystem
java.io.IOException
- if the provided WKT has a syntax error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |