|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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(File fileName)
|
|
WKTParser(String fileName)
Constructor |
Method Summary | |
---|---|
protected boolean |
equalsParameterVariants(String candidate,
String paramName)
|
protected String |
makeInvariantKey(String candidate)
|
static CRS |
parse(String wkt)
|
protected CRSCodeType |
parseAuthority()
|
protected Axis |
parseAxis()
|
protected CompoundCRS |
parseCompoundCRS()
Parses a CompoundCRS from the current WKT location. |
CRS |
parseCoordinateSystem()
|
protected Ellipsoid |
parseEllipsoid()
|
protected GeocentricCRS |
parseGeocentricCRS()
|
protected GeodeticDatum |
parseGeodeticDatum()
|
protected GeographicCRS |
parseGeographiCRS()
|
protected Helmert |
parseHelmert()
|
protected PrimeMeridian |
parsePrimeMeridian()
|
protected ProjectedCRS |
parseProjectedCRS()
|
protected 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(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(String fileName) throws IOException
fileName
- the file that contains a Coordinate System definition
IOException
- if the provided WKT has a syntax errorpublic WKTParser(File fileName) throws FileNotFoundException
fileName
- to read a wkt from.
FileNotFoundException
Method Detail |
---|
protected boolean equalsParameterVariants(String candidate, String paramName)
candidate
- paramName
-
protected String makeInvariantKey(String candidate)
protected void passOverChar(char ch) throws IOException
ch
-
IOException
- if an I/O error occurs.
WKTParsingException
- if the expected character is not present at this position.protected void passOverOpeningBracket() throws IOException
IOException
- if an I/O error occurs.
WKTParsingException
- if the opening bracket is not present at this position.protected void passOverClosingBracket() throws IOException
IOException
- if an I/O error occurs.
WKTParsingException
- if the closing bracket is not present at this position.protected void passOverWord(String s) throws IOException
s
- the keyword element as a String
IOException
- if an I/O error occurs.
WKTParsingException
- if the keyword is not present at this position.protected CRSCodeType parseAuthority() throws IOException
IOException
- if an I/O error occursprotected String parseString() throws IOException
IOException
- if an I/O error occurs
WKTParsingException
- if the string does not begin with have an opening double-quote.protected Axis parseAxis() throws IOException
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 IOException
IOException
UnknownUnitException
- if the unit name does not match any of the predefined units in the APIprotected PrimeMeridian parsePrimeMeridian() throws IOException
IOException
protected Ellipsoid parseEllipsoid() throws IOException
IOException
protected Helmert parseHelmert() throws IOException
IOException
protected GeodeticDatum parseGeodeticDatum() throws IOException
IOException
protected VerticalDatum parseVerticalDatum() throws IOException
IOException
protected VerticalCRS parseVerticalCRS() throws IOException
VerticalCRS
parsed from the current reader position.
IOException
protected GeocentricCRS parseGeocentricCRS() throws IOException
GeocentricCRS
parsed from the current reader position.
IOException
protected GeographicCRS parseGeographiCRS() throws IOException
GeographicCRS
parsed from the current reader position.
IOException
protected ProjectedCRS parseProjectedCRS() throws IOException
ProjectedCRS
parsed from the current reader position.
IOException
protected CompoundCRS parseCompoundCRS() throws IOException
CompoundCRS
from the current WKT location.
CompoundCRS
parsed from the current reader position.
IOException
public CRS parseCoordinateSystem() throws IOException
IOException
- if the provided WKT has a syntax errorpublic static CRS parse(String wkt) throws IOException
wkt
- the wkt code as a String
CRS
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 |