|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.framework.xml.XMLFragment org.deegree.crs.configuration.resources.XMLFileResource org.deegree.crs.configuration.deegree.CRSParser
public class CRSParser
The CRSParser
class TODO add class documentation here.
Field Summary |
---|
Fields inherited from class org.deegree.framework.xml.XMLFragment |
---|
DEFAULT_URL, nsContext, XLNNS |
Constructor Summary | |
---|---|
CRSParser(DeegreeCRSProvider provider,
Element rootElement)
|
|
CRSParser(DeegreeCRSProvider provider,
Properties properties)
|
|
CRSParser(DeegreeCRSProvider provider,
Properties properties,
String defaultRootElement,
String namespace)
|
Method Summary | ||
---|---|---|
protected
|
checkForUniqueness(List<T> uniqueList,
Map<String,String> mapping,
T toBeChecked)
|
|
protected Helmert |
getConversionInfoFromID(String infoID)
|
|
protected Ellipsoid |
getEllipsoidFromID(String ellipsoidID)
Tries to find a cached ellipsoid, if not found, the config will be checked. |
|
protected GeodeticDatum |
getGeodeticDatumFromID(String datumID)
|
|
protected PrimeMeridian |
getPrimeMeridianFromID(String meridianID)
|
|
Transformation |
getTransformation(CoordinateSystem sourceCRS,
CoordinateSystem targetCRS)
Implementations should find a given transformation (chain) which transforms coordinates of the given coordinate system into coordinates of the target crs. |
|
protected PolynomialTransformation |
getTransformation(Element transformationElement)
Parses the transformation variables from the given crs:coordinatesystem/crs:polynomialTransformation element. |
|
Element |
getURIAsType(String uri)
Opens a stream to a resource which is defined by the uri. |
|
String |
getVersion()
|
|
Helmert |
getWGS84Transformation(GeographicCRS sourceCRS)
Implementations should find the helmert transformation which transforms coordinates of the geodetic datum into coordinates of the WGS84 datum. |
|
protected List<PolynomialTransformation> |
parseAlternativeTransformations(Element crsElement)
Parse all polynomial transformations for a given crs. |
|
protected Axis[] |
parseAxisOrder(Element crsElement)
Creates an axis array for the given crs element. |
|
protected CoordinateSystem |
parseCompoundCRS(Element crsElement)
|
|
CoordinateSystem |
parseCoordinateSystem(Element crsDefintion)
|
|
protected CoordinateSystem |
parseGeocentricCRS(Element crsElement)
|
|
protected CoordinateSystem |
parseGeographicCRS(Element crsElement)
|
|
protected Identifiable |
parseIdentifiable(Element element)
Parses all elements of the identifiable object. |
|
Identifiable |
parseIdentifiableObject(String id)
Gets the Element for the given id and heuristically check the localname of the resulting root Element. |
|
protected CoordinateSystem |
parseProjectedCRS(Element crsElement)
|
|
protected Projection |
parseProjection(Element projectionElement,
GeographicCRS underlyingCRS,
Unit units)
Parses and instantiates the projection from the given element. |
|
protected GeodeticDatum |
parseReferencedGeodeticDatum(Element parentElement,
String parentID)
Parses the required usedDatum element from the given parentElement (probably a crs element). |
|
Transformation |
parseTransformation(Element transformationDefinition)
Retrieves a transformation from the resource. |
|
protected Unit |
parseUnit(Element parent)
Parses a unit from the given xml-parent. |
Methods inherited from class org.deegree.crs.configuration.resources.XMLFileResource |
---|
getProvider |
Methods inherited from class org.deegree.framework.xml.XMLFragment |
---|
getAsPrettyString, getAsString, getAttachedSchemas, getQualifiedName, getRootElement, getSystemId, hasSchema, load, load, load, parseQualifiedName, parseSimpleLink, prettyPrint, prettyPrint, resolve, setRootElement, setSystemId, setSystemId, toString, write, write, write, write |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public CRSParser(DeegreeCRSProvider provider, Element rootElement)
provider
- to be used for callback.rootElement
- to be used for the configuration.public CRSParser(DeegreeCRSProvider provider, Properties properties)
provider
- properties
- public CRSParser(DeegreeCRSProvider provider, Properties properties, String defaultRootElement, String namespace)
provider
- properties
- defaultRootElement
- namespace
- Method Detail |
---|
public CoordinateSystem parseCoordinateSystem(Element crsDefintion) throws CRSConfigurationException
crsDefintion
- to be parsed
null
if the crsDefinition is null
or could
not be mapped to a valid type.
CRSConfigurationException
- if something went wrong while constructing the crs.public Element getURIAsType(String uri) throws IOException
XLinkResolver
uri
- to locate
null
if no resource was found.
IOException
- If an error occurred while locating or opening the resource.public Helmert getWGS84Transformation(GeographicCRS sourceCRS)
CRSResource
null
sourceCRS
- to retrieve the transformation for.
Helmert
transformation or null
if no such transformation was defined.public String getVersion() throws CRSConfigurationException
CRSConfigurationException
- if the root element is emptyprotected Identifiable parseIdentifiable(Element element) throws CRSConfigurationException
element
- the xml-representation of the id-object
null
if no id was given.
CRSConfigurationException
protected Axis[] parseAxisOrder(Element crsElement) throws CRSConfigurationException
crsElement
- to be parsed
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred, or the axisorder uses
names which were not defined in the axis elements.public Transformation parseTransformation(Element transformationDefinition)
transformationDefinition
-
null
if no transformation could be parsed.protected List<PolynomialTransformation> parseAlternativeTransformations(Element crsElement)
crsElement
- to parse the transformations for.
null
.protected PolynomialTransformation getTransformation(Element transformationElement)
null
will be returned.
transformationElement
- to parse the values from.
null
if it could not be instantiated.protected Unit parseUnit(Element parent) throws CRSConfigurationException
parent
- xml-node to parse the unit from.
CRSConfigurationException
- if the unit object could not be created.protected CoordinateSystem parseProjectedCRS(Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using chached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseGeographicCRS(Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using cached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseGeocentricCRS(Element crsElement) throws CRSConfigurationException
crsElement
- from which the crs is to be created (using cached datums, conversioninfos and projections).
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected CoordinateSystem parseCompoundCRS(Element crsElement)
crsElement
- from which the crs is to be created.
CRSConfigurationException
- if a required element could not be found, or an xmlParsingException occurred.protected GeodeticDatum parseReferencedGeodeticDatum(Element parentElement, String parentID) throws CRSConfigurationException
parentElement
- to parse the required usedDatum element from.parentID
- optional for an appropriate error message.
CRSConfigurationException
- if a parsing error occurred, the node was not defined or an illegal id reference (not found) was
given.protected GeodeticDatum getGeodeticDatumFromID(String datumID) throws CRSConfigurationException
datumID
-
CRSConfigurationException
protected PrimeMeridian getPrimeMeridianFromID(String meridianID) throws CRSConfigurationException
meridianID
- the id to search for.
null
CRSConfigurationException
- if the longitude was not set or the units could not be parsed.protected Ellipsoid getEllipsoidFromID(String ellipsoidID) throws CRSConfigurationException
ellipsoidID
-
null
if no ellipsoid with given id was found, or the id was
null
or empty.
CRSConfigurationException
- if something went wrong.protected Helmert getConversionInfoFromID(String infoID) throws CRSConfigurationException
infoID
- to get the conversioninfo from.
CRSConfigurationException
protected Projection parseProjection(Element projectionElement, GeographicCRS underlyingCRS, Unit units) throws CRSConfigurationException
projectionElement
- to create the projection from.underlyingCRS
- of the projected crsunits
- of the projected crs
null
if not defined or found.
CRSConfigurationException
protected <T extends Identifiable> T checkForUniqueness(List<T> uniqueList, Map<String,String> mapping, T toBeChecked)
T
- should be at least of Type Identifiable.uniqueList
- to check againstmapping
- to added the id of T to if it is found duplicate.toBeChecked
- to check.
public Transformation getTransformation(CoordinateSystem sourceCRS, CoordinateSystem targetCRS)
CRSResource
null
sourceCRS
- start point of the transformation.targetCRS
- end point of the transformations
Transformation
or null
if no such transformation was defined.public Identifiable parseIdentifiableObject(String id)
- ellipsoid
- geodeticDatum
- projectedCRS
- geographicCRS
- compoundCRS
- geocentricCRS
- primeMeridian
- wgs84Transformation
id
- to look for.
Identifiable
or null
if it could not be parsed.
|
deegree 2.3 (2010/04/09 10:10 build-4-official) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org