public class TLcdOGCModelReferenceParser extends Object implements ILcdModelReferenceParser, ILcdXYWorldReferenceParser
urn:ogc:def:crs:EPSG::<code>
, http://www.opengis.net/gml/srs/epsg.xml#<code>
, or EPSG:<code>
.
Refer to TLcdEPSGReferenceParser
for a list of the supported codes.
urn:ogc:def:crs:WKT::<URL-encoded WKT string>
, WKT:<version>:<URL-encoded WKT string>
or WKT:<URL-encoded WKT string>
urn:ogc:def:crs:OGC:<version>:<name>
, with <name>
being one of CRS84
, CRS83
, or CRS27
WGS84
, LL-WGS84
and NAD83
"EPSG:4326"
and "http://www.opengis.net/gml/srs/epsg.xml#4326"
can be changed to lon-lat as follows:
TLcdOGCModelReferenceParser parser = new TLcdOGCModelReferenceParser();
parser.setParseUnprefixedEPSG4326AsLonLat(true);
parser.setParseGMLPrefixedEPSG4326AsLonLat(true);
Other notations of EPSG:4326 (e.g. "urn:ogc:def:crs:EPSG::4326"
) should not give any problems, because they
are only supported by more recent server implementations, which parse the axis order
as expected.Constructor and Description |
---|
TLcdOGCModelReferenceParser() |
Modifier and Type | Method and Description |
---|---|
boolean |
isParseGMLPrefixedEPSG4326AsLonLat()
Returns whether or not the parser interprets the "http://www.opengis.net/gml/srs/epsg.xml#4326" string as being lon-lat instead of the more correct lat-lon.
|
boolean |
isParseUnprefixedEPSG4326AsLonLat()
Returns whether or not the parser interprets the "EPSG:4326" string as being lon-lat instead of the more correct lat-lon.
|
ILcdModelReference |
parseModelReference(String aUrn)
Returns the
ILcdModelReference that corresponds to the specified string representation. |
ILcdXYWorldReference |
parseXYWorldReference(String aUrn)
Returns the
ILcdXYWorldReference that is formatted as a String. |
void |
setParseGMLPrefixedEPSG4326AsLonLat(boolean aParseGMLPrefixedEPSG4326AsLonLat)
If true, parses the "http://www.opengis.net/gml/srs/epsg.xml#4326" string as a lon-lat reference instead of the more correct lat-lon.
|
void |
setParseUnprefixedEPSG4326AsLonLat(boolean aParseUnprefixedEPSG4326AsLonLat)
If true, parses the "EPSG:4326" string as a lon-lat reference instead of the more correct lat-lon.
|
public ILcdModelReference parseModelReference(String aUrn) throws ParseException
ILcdModelReferenceParser
ILcdModelReference
that corresponds to the specified string representation.parseModelReference
in interface ILcdModelReferenceParser
aUrn
- the String representation to be converted to an ILcdModelReference
.ILcdModelReference
that corresponds to the specified string, never null
.ParseException
- if this parser cannot convert the specified string into a model reference
(e.g. if the code is not supported or if the code was not valid)public ILcdXYWorldReference parseXYWorldReference(String aUrn) throws ParseException
ILcdXYWorldReferenceParser
ILcdXYWorldReference
that is formatted as a String.parseXYWorldReference
in interface ILcdXYWorldReferenceParser
aUrn
- the String representation of the ILcdXYWorldReference
.ILcdXYWorldReference
that is formatted as a String. Never null
.ParseException
- If the ILcdXYWorldReference
cannot be created from the String.public void setParseUnprefixedEPSG4326AsLonLat(boolean aParseUnprefixedEPSG4326AsLonLat)
aParseUnprefixedEPSG4326AsLonLat
- true to parse "EPSG:4326" as a lon-lat referencepublic boolean isParseUnprefixedEPSG4326AsLonLat()
setParseUnprefixedEPSG4326AsLonLat(boolean)
public void setParseGMLPrefixedEPSG4326AsLonLat(boolean aParseGMLPrefixedEPSG4326AsLonLat)
aParseGMLPrefixedEPSG4326AsLonLat
- true to parse "http://www.opengis.net/gml/srs/epsg.xml#4326" as a lon-lat referencepublic boolean isParseGMLPrefixedEPSG4326AsLonLat()
setParseGMLPrefixedEPSG4326AsLonLat(boolean)