|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.deegree.crs.configuration.deegree.db.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.
| Field Summary | |
|---|---|
(package private) StreamTokenizer |
tokenizer
|
| Constructor Summary | |
|---|---|
WKTParser()
Use this if you want to parse WKT strings directly using the parse method. |
|
WKTParser(String fileName)
Constructor |
|
| Method Summary | |
|---|---|
(package private) String |
containsVariantsKey(Map<String,Double> params,
String candidate)
|
(package private) boolean |
equalsParameterVariants(String candidate,
String paramName)
|
static void |
main(String[] args)
For testing purposes. |
CoordinateSystem |
parse(String wkt)
|
(package private) Unit |
parseAngularUnit()
|
(package private) CRSCodeType |
parseAuthority()
|
(package private) Axis |
parseAxis()
|
CoordinateSystem |
parseCoordinateSystem()
|
(package private) Ellipsoid |
parseEllipsoid()
|
(package private) GeodeticDatum |
parseGeodeticDatum()
|
(package private) Helmert |
parseHelmert()
|
(package private) Unit |
parseLinearUnit()
|
(package private) PrimeMeridian |
parsePrimeMeridian()
|
(package private) String |
parseString()
|
(package private) VerticalDatum |
parseVerticalDatum()
|
(package private) void |
passOverChar(char ch)
Walk a character (comma or round/square bracket). |
(package private) void |
passOverClosingBracket()
Walk a closing bracket (round or square). |
(package private) void |
passOverOpeningBracket()
Walk an opening bracket (round or square). |
(package private) 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 |
| Field Detail |
|---|
StreamTokenizer tokenizer
| 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()
| Method Detail |
|---|
boolean equalsParameterVariants(String candidate,
String paramName)
String containsVariantsKey(Map<String,Double> params,
String candidate)
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.
void passOverOpeningBracket()
throws IOException
IOException - if an I/O error occurs.
WKTParsingException - if the opening bracket is not present at this position.
void passOverClosingBracket()
throws IOException
IOException - if an I/O error occurs.
WKTParsingException - if the closing bracket is not present at this position.
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.
CRSCodeType parseAuthority()
throws IOException
IOException - if an I/O error occurs
String parseString()
throws IOException
IOException - if an I/O error occurs
WKTParsingException - if the string does not begin with have an opening double-quote.
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 )
Unit parseLinearUnit()
throws IOException
IOException
UnknownUnitException - if the unit name does not match any of the predefined units in the API
Unit parseAngularUnit()
throws IOException
IOException
UnknownUnitException - if the unit name does not match any of the predefined units in the API
PrimeMeridian parsePrimeMeridian()
throws IOException
IOException
Ellipsoid parseEllipsoid()
throws IOException
IOException
Helmert parseHelmert()
throws IOException
IOException
GeodeticDatum parseGeodeticDatum()
throws IOException
IOException
VerticalDatum parseVerticalDatum()
throws IOException
IOException
public CoordinateSystem parseCoordinateSystem()
throws IOException
IOException - if the provided WKT has a syntax error
public CoordinateSystem parse(String wkt)
throws IOException
wkt - the wkt code as a String
CoordinateSystem
IOException - if the provided WKT has a syntax error
public static void main(String[] args)
throws IOException
args - the first argument is the file containing the Coordinate System.
IOException - if the provided WKT has a syntax error
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||