org.cts.parser.prj
Class PrjParser

java.lang.Object
  extended by org.cts.parser.prj.PrjParser

public class PrjParser
extends Object

Parser for PRJ / WKT (OGC & ESRI) String. This very simple parser works in tree steps: 1. it parses the PRJ String and produces an abstract tree, without any assumptions on it being a valid OGC WKT String. 2. it walks the tree looking for the values needed for transformation into a proj4 description string. 3. the proj4 description string is passed to the org.jproj.parser.Proj4Parser that builds the CRS.

Author:
Antoine Gourlay, Erwan Bocher, Jules Party

Constructor Summary
PrjParser()
          Creates a new parser.
 
Method Summary
 Map<String,String> getParameters(String prjString)
          Parses a WKT PRJ String into a set of parameters.
 PrjElement parseNode(CharBuffer s)
          Parses a Node into its PrjElement representation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PrjParser

public PrjParser()
Creates a new parser.

Method Detail

getParameters

public Map<String,String> getParameters(String prjString)
Parses a WKT PRJ String into a set of parameters. This is the main entry point of the parser.

Parameters:
prjString - a WKT string
Returns:
a list of parameters
Throws:
PrjParserException - if the PRJ cannot be parsed into a CRS for any reason

parseNode

public PrjElement parseNode(CharBuffer s)
Parses a Node into its PrjElement representation.

Parameters:
s - the Buffer to parse


Copyright © 2014 IRSTV CNRS-FR-2488. All Rights Reserved.