Package mil.nga.crs.wkt
Class CRSReader
- java.lang.Object
-
- mil.nga.crs.wkt.CRSReader
-
- All Implemented Interfaces:
Closeable,AutoCloseable
public class CRSReader extends Object implements Closeable
Well-Known Text reader- Author:
- osbornb
-
-
Constructor Summary
Constructors Constructor Description CRSReader(String text)ConstructorCRSReader(String text, boolean strict)ConstructorCRSReader(TextReader reader)ConstructorCRSReader(TextReader reader, boolean strict)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddTransformParameters(String[] transform, MapProjection mapProjection)Add transform parameters to the map projectionvoidclose()TextReadergetTextReader()Get the text readerbooleanisStrict()Is strict rule enforcement enabledCRSKeywordpeekKeyword()Peek a WKT CRS keywordSet<CRSKeyword>peekKeywords()Peek WKT CRS keywordsbooleanpeekLeftDelimiter()Peek if the next token is a left delimiterCRSKeywordpeekOptionalKeyword()Peek an optional WKT CRS keywordCRSKeywordpeekOptionalKeyword(int num)Peek an optional WKT CRS keywordSet<CRSKeyword>peekOptionalKeywords()Peek an optional WKT CRS keywordsSet<CRSKeyword>peekOptionalKeywords(int num)Peek an optional WKT CRS keywordsbooleanpeekRightDelimiter()Peek if the next token is a right delimiterbooleanpeekSeparator()Peek if the next token is a WKT Separator (comma)CRSread()Read a CRS object from the well-known textstatic CRSread(String text)Read a Coordinate Reference System from the well-known textstatic CRSread(String text, boolean strict)Read a Coordinate Reference System from the well-known textstatic CRSread(String text, boolean strict, CRSType... expected)Read a Coordinate Reference System from the well-known textstatic CRSread(String text, CRSType... expected)Read a Coordinate Reference System from the well-known textAbridgedCoordinateTransformationreadAbridgedCoordinateTransformation()Read an Abridged Coordinate TransformationdoublereadAccuracy()Read an operation accuracyStringreadAccuracyText()Read an operation accuracyUnitreadAngleUnit()Read an Angle UnitStringreadAreaDescription()Read an Area descriptionList<Axis>readAxes()Read AxesList<Axis>readAxes(CoordinateSystemType type)Read AxesAxisreadAxis()Read an AxisAxisreadAxis(CoordinateSystemType type)Read an AxisBoundCoordinateReferenceSystemreadBound()Read a Bound CRSstatic BoundCoordinateReferenceSystemreadBound(String text)Read Bound Coordinate Reference System from the well-known textList<OperationParameter>readBoundParameters()Read Bound CRS Abridged Transformation parametersCompoundCoordinateReferenceSystemreadCompound()Read a Compound CRSstatic CompoundCoordinateReferenceSystemreadCompound(String text)Read a Compound Coordinate Reference System from the well-known textConcatenatedOperationreadConcatenatedOperation()Read Concatenated Operationstatic ConcatenatedOperationreadConcatenatedOperation(String text)Read Concatenated Operation from the well-known textCoordinateMetadatareadCoordinateMetadata()Read Coordinate Metadatastatic CoordinateMetadatareadCoordinateMetadata(String text)Read Coordinate Metadata from the well-known textCoordinateOperationreadCoordinateOperation()Read Coordinate Operationstatic CoordinateOperationreadCoordinateOperation(String text)Read Coordinate Operation from the well-known textList<OperationParameter>readCoordinateOperationParameters()Read Coordinate Operation parametersCoordinateReferenceSystemreadCoordinateReferenceSystem()Read a Coordinate Reference System from the well-known textstatic CoordinateReferenceSystemreadCoordinateReferenceSystem(String text)Read a Coordinate Reference System from the well-known textstatic CoordinateReferenceSystemreadCoordinateReferenceSystem(String text, boolean strict)Read a Coordinate Reference System from the well-known textCoordinateReferenceSystemreadCoordinateReferenceSystem(CRSKeyword keyword)Read a coordinate reference system with the keywordCoordinateSystemreadCoordinateSystem()Read a Coordinate systemCoordinateSystemreadCoordinateSystemCompat(CRSType type, ReferenceFrame datum)Read a Backward Compatible Coordinate SystemReferenceFramereadDatumCompat()Read a Backward Compatible datumReferenceFramereadDatumCompat(SimpleCoordinateReferenceSystem crs)Read a Backward Compatible datumDatumEnsemblereadDatumEnsemble()Read a Datum ensembleDatumEnsembleMemberreadDatumEnsembleMember()Read a Datum ensemble memberstatic DerivedCoordinateReferenceSystemreadDerived(String text)Read a Derived Coordinate Reference System from the well-known textList<OperationParameter>readDerivedParameters()Read Derived parametersDerivedCoordinateReferenceSystemreadDerivedProjected()Read a Derived Projected CRSDerivingConversionreadDerivingConversion()Read a Deriving ConversionDynamicreadDynamic()Read a Dynamic coordinate reference systemEllipsoidreadEllipsoid()Read an EllipsoidvoidreadEnd()"Read" an expected end, checking for unexpected trailing tokensCoordinateReferenceSystemreadEngineering()Read an Engineering CRSstatic EngineeringCoordinateReferenceSystemreadEngineering(String text)Read an Engineering Coordinate Reference System from the well-known textEngineeringCoordinateReferenceSystemreadEngineeringCompat()Read a Backward Compatible Engineering CRSEngineeringDatumreadEngineeringDatum()Read an Engineering datumEngineeringDatumreadEngineeringDatum(SimpleCoordinateReferenceSystem crs)Read an Engineering datumEngineeringDatumreadEngineeringDatumCompat()Read a Backward Compatible engineering datumEngineeringDatumreadEngineeringDatumCompat(SimpleCoordinateReferenceSystem crs)Read a Backward Compatible engineering datumMap<String,Object>readExtensionsCompat()Read Backward Compatible ExtensionsExtentreadExtent()Read an ExtentCoordinateReferenceSystemreadGeo()Read a Geodetic or Geographic CRSstatic GeoCoordinateReferenceSystemreadGeo(String text)Read a Geodetic or Geographic Coordinate Reference System from the well-known textGeoCoordinateReferenceSystemreadGeoCompat()Read a Backward Compatible Geodetic or Geographic CRSstatic GeoCoordinateReferenceSystemreadGeoCompat(String text)Read a Backward Compatible Geodetic or Geographic Coordinate Reference System from the well-known textGeoCoordinateReferenceSystemreadGeoCompat(CRSType expectedType)Read a Backward Compatible Geodetic or Geographic CRSGeoDatumEnsemblereadGeoDatumEnsemble()Read a Geo datum ensemblestatic GeoCoordinateReferenceSystemreadGeodetic(String text)Read a Geodetic Coordinate Reference System from the well-known textGeoCoordinateReferenceSystemreadGeodeticCompat()Read a Backward Compatible Geodetic CRSstatic GeoCoordinateReferenceSystemreadGeodeticCompat(String text)Read a Backward Compatible Geodetic Coordinate Reference System from the well-known textstatic GeoCoordinateReferenceSystemreadGeographic(String text)Read a Geographic Coordinate Reference System from the well-known textGeographicBoundingBoxreadGeographicBoundingBox()Read a Geographic bounding boxGeoCoordinateReferenceSystemreadGeographicCompat()Read a Backward Compatible Geographic CRSstatic GeoCoordinateReferenceSystemreadGeographicCompat(String text)Read a Backward Compatible Geographic Coordinate Reference System from the well-known textGeoReferenceFramereadGeoReferenceFrame()Read a Geo reference frameGeoReferenceFramereadGeoReferenceFrame(SimpleCoordinateReferenceSystem crs)Read a Geo reference frameIdentifierreadIdentifier()Read an IdentifierList<Identifier>readIdentifiers()Read IdentifiersCoordinateReferenceSystemreadInterpolation()Read a interpolation coordinate reference systemCRSKeywordreadKeyword()Read a WKT CRS keywordCRSKeywordreadKeyword(boolean required, CRSKeyword... keywords)Read looking for a specific WKT CRS keyword, skipping others if not strict modeCRSKeywordreadKeyword(CRSKeyword... keywords)Read a specific WKT CRS keyword, next token when strict, until found when notStringreadKeywordDelimitedToken(CRSKeyword keyword)Read a keyword delimited tokenSet<CRSKeyword>readKeywords()Read WKT CRS keywordsvoidreadLeftDelimiter()Read a left delimiterUnitreadLengthUnit()Read a Length UnitMapProjectionreadMapProjection()Read a Map projectionMapProjectionreadMapProjectionCompat()Read a Backward Compatible map projectionOperationMethodreadMethod()Read an operation methodOperationParameterreadParameter(CRSType type)Read an Operation parameterOperationParameterreadParameterFile()Read an Operation parameter fileList<OperationParameter>readParameters(CRSType type)Read Operation parametersList<OperationParameter>readParametersAndFiles(CRSType type)Read Operation parameters and parameter filesCoordinateReferenceSystemreadParametric()Read a Parametric CRSstatic ParametricCoordinateReferenceSystemreadParametric(String text)Read an Parametric Coordinate Reference System from the well-known textParametricDatumreadParametricDatum()Read a Parametric datumParametricDatumreadParametricDatum(SimpleCoordinateReferenceSystem crs)Read a Parametric datumUnitreadParametricUnit()Read a Parametric UnitPointMotionOperationreadPointMotionOperation()Read Point Motion Operationstatic PointMotionOperationreadPointMotionOperation(String text)Read Point Motion Operation from the well-known textList<OperationParameter>readPointMotionOperationParameters()Read Point Motion Operation parametersPrimeMeridianreadPrimeMeridian()Read a Prime meridianProjectedCoordinateReferenceSystemreadProjected()Read a Projected CRSstatic ProjectedCoordinateReferenceSystemreadProjected(String text)Read a Projected Coordinate Reference System from the well-known textProjectedCoordinateReferenceSystemreadProjected(CRSType expectedBaseType)Read a Projected CRSProjectedCoordinateReferenceSystemreadProjectedCompat()Read a Backward Compatible Projected CRSstatic ProjectedCoordinateReferenceSystemreadProjectedCompat(String text)Read a Backward Compatible Projected Coordinate Reference System from the well-known textProjectedCoordinateReferenceSystemreadProjectedCompat(CRSType expectedBaseType)Read a Backward Compatible Projected CRSProjectedCoordinateReferenceSystemreadProjectedGeodetic()Read a Projected Geodetic CRSstatic ProjectedCoordinateReferenceSystemreadProjectedGeodetic(String text)Read a Projected Geodetic Coordinate Reference System from the well-known textProjectedCoordinateReferenceSystemreadProjectedGeodeticCompat()Read a Backward Compatible Projected Geodetic CRSstatic ProjectedCoordinateReferenceSystemreadProjectedGeodeticCompat(String text)Read a Backward Compatible Projected Geodetic Coordinate Reference System from the well-known textProjectedCoordinateReferenceSystemreadProjectedGeographic()Read a Projected Geographic CRSstatic ProjectedCoordinateReferenceSystemreadProjectedGeographic(String text)Read a Projected Geographic Coordinate Reference System from the well-known textProjectedCoordinateReferenceSystemreadProjectedGeographicCompat()Read a Backward Compatible Projected Geographic CRSstatic ProjectedCoordinateReferenceSystemreadProjectedGeographicCompat(String text)Read a Backward Compatible Projected Geographic Coordinate Reference System from the well-known textList<OperationParameter>readProjectedParameters()Read projected parametersReferenceFramereadReferenceFrame()Read a Reference frame (datum)ReferenceFramereadReferenceFrame(SimpleCoordinateReferenceSystem crs)Read a Reference frame (datum)StringreadRemark()Read RemarkvoidreadRightDelimiter()Read skipping tokens until an external right delimiter (first right delimiter without a preceding left)UnitreadScaleUnit()Read a Scale UnitStringreadScope()Read a ScopevoidreadScopeExtentIdentifierRemark(ScopeExtentIdentifierRemark object)Read the usages (scope and extent), identifiers, and remark into the objectvoidreadSeparator()Read a WKT Separator (comma)SimpleCoordinateReferenceSystemreadSimpleCoordinateReferenceSystem()Read a Simple Coordinate Reference System from the well-known textstatic SimpleCoordinateReferenceSystemreadSimpleCoordinateReferenceSystem(String text)Read a Simple Coordinate Reference System from the well-known textstatic SimpleCoordinateReferenceSystemreadSimpleCoordinateReferenceSystem(String text, boolean strict)Read a Simple Coordinate Reference System from the well-known textCoordinateReferenceSystemreadSource()Read a source coordinate reference systemCoordinateReferenceSystemreadTarget()Read a target coordinate reference systemCoordinateReferenceSystemreadTemporal()Read a Temporal CRSstatic TemporalCoordinateReferenceSystemreadTemporal(String text)Read an Temporal Coordinate Reference System from the well-known textTemporalDatumreadTemporalDatum()Read a Temporal DatumTemporalExtentreadTemporalExtent()Read a Temporal extentUnitreadTimeUnit()Read a Time UnitCRSKeywordreadToKeyword(CRSKeyword... keywords)Read skipping tokens up until before an optional WKT CRS keywordString[]readToWGS84Compat()Read a Backward Compatible To WGS84 transformationUnitreadUnit()Read a UnitUnitreadUnit(UnitType type)Read a UnitUsagereadUsage()Read a UsageList<Usage>readUsages()Read UsagesStringreadVersion()Read an operation versionCoordinateReferenceSystemreadVertical()Read a Vertical CRSstatic VerticalCoordinateReferenceSystemreadVertical(String text)Read a Vertical Coordinate Reference System from the well-known textVerticalCoordinateReferenceSystemreadVerticalCompat()Read a Backward Compatible Vertical CRSVerticalReferenceFramereadVerticalDatumCompat()Read a Backward Compatible vertical datumVerticalReferenceFramereadVerticalDatumCompat(SimpleCoordinateReferenceSystem crs)Read a Backward Compatible vertical datumVerticalDatumEnsemblereadVerticalDatumEnsemble()Read a Vertical datum ensembleVerticalExtentreadVerticalExtent()Read a Vertical extentVerticalReferenceFramereadVerticalReferenceFrame()Read a Vertical reference frameVerticalReferenceFramereadVerticalReferenceFrame(SimpleCoordinateReferenceSystem crs)Read a Vertical reference framevoidreset()Reset the readervoidsetStrict(boolean strict)Set the strict rule enforcement setting
-
-
-
Constructor Detail
-
CRSReader
public CRSReader(String text)
Constructor- Parameters:
text- well-known text
-
CRSReader
public CRSReader(TextReader reader)
Constructor- Parameters:
reader- text reader
-
CRSReader
public CRSReader(String text, boolean strict)
Constructor- Parameters:
text- well-known textstrict- strict rule enforcement
-
CRSReader
public CRSReader(TextReader reader, boolean strict)
Constructor- Parameters:
reader- text readerstrict- strict rule enforcement
-
-
Method Detail
-
read
public static CRS read(String text) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
read
public static CRS read(String text, boolean strict) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known textstrict- strict enforcement- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
read
public static CRS read(String text, CRSType... expected) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known textexpected- expected types- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
read
public static CRS read(String text, boolean strict, CRSType... expected) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known textstrict- strict enforcementexpected- expected types- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readCoordinateReferenceSystem
public static CoordinateReferenceSystem readCoordinateReferenceSystem(String text) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readCoordinateReferenceSystem
public static CoordinateReferenceSystem readCoordinateReferenceSystem(String text, boolean strict) throws IOException
Read a Coordinate Reference System from the well-known text- Parameters:
text- well-known textstrict- strict enforcement- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readSimpleCoordinateReferenceSystem
public static SimpleCoordinateReferenceSystem readSimpleCoordinateReferenceSystem(String text) throws IOException
Read a Simple Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Simple Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readSimpleCoordinateReferenceSystem
public static SimpleCoordinateReferenceSystem readSimpleCoordinateReferenceSystem(String text, boolean strict) throws IOException
Read a Simple Coordinate Reference System from the well-known text- Parameters:
text- well-known textstrict- strict enforcement- Returns:
- Simple Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeo
public static GeoCoordinateReferenceSystem readGeo(String text) throws IOException
Read a Geodetic or Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geodetic or Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeodetic
public static GeoCoordinateReferenceSystem readGeodetic(String text) throws IOException
Read a Geodetic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geodetic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeographic
public static GeoCoordinateReferenceSystem readGeographic(String text) throws IOException
Read a Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjected
public static ProjectedCoordinateReferenceSystem readProjected(String text) throws IOException
Read a Projected Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjectedGeodetic
public static ProjectedCoordinateReferenceSystem readProjectedGeodetic(String text) throws IOException
Read a Projected Geodetic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Geodetic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjectedGeographic
public static ProjectedCoordinateReferenceSystem readProjectedGeographic(String text) throws IOException
Read a Projected Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readVertical
public static VerticalCoordinateReferenceSystem readVertical(String text) throws IOException
Read a Vertical Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Vertical Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readEngineering
public static EngineeringCoordinateReferenceSystem readEngineering(String text) throws IOException
Read an Engineering Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Engineering Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readParametric
public static ParametricCoordinateReferenceSystem readParametric(String text) throws IOException
Read an Parametric Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Parametric Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readTemporal
public static TemporalCoordinateReferenceSystem readTemporal(String text) throws IOException
Read an Temporal Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Temporal Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readDerived
public static DerivedCoordinateReferenceSystem readDerived(String text) throws IOException
Read a Derived Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Derived Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readCompound
public static CompoundCoordinateReferenceSystem readCompound(String text) throws IOException
Read a Compound Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Compound Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readCoordinateMetadata
public static CoordinateMetadata readCoordinateMetadata(String text) throws IOException
Read Coordinate Metadata from the well-known text- Parameters:
text- well-known text- Returns:
- Coordinate Metadata
- Throws:
IOException- upon failure to read
-
readCoordinateOperation
public static CoordinateOperation readCoordinateOperation(String text) throws IOException
Read Coordinate Operation from the well-known text- Parameters:
text- well-known text- Returns:
- Coordinate Operation
- Throws:
IOException- upon failure to read
-
readPointMotionOperation
public static PointMotionOperation readPointMotionOperation(String text) throws IOException
Read Point Motion Operation from the well-known text- Parameters:
text- well-known text- Returns:
- Point Motion Operation
- Throws:
IOException- upon failure to read
-
readConcatenatedOperation
public static ConcatenatedOperation readConcatenatedOperation(String text) throws IOException
Read Concatenated Operation from the well-known text- Parameters:
text- well-known text- Returns:
- Concatenated Operation
- Throws:
IOException- upon failure to read
-
readBound
public static BoundCoordinateReferenceSystem readBound(String text) throws IOException
Read Bound Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Bound Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeoCompat
public static GeoCoordinateReferenceSystem readGeoCompat(String text) throws IOException
Read a Backward Compatible Geodetic or Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geodetic or Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeodeticCompat
public static GeoCoordinateReferenceSystem readGeodeticCompat(String text) throws IOException
Read a Backward Compatible Geodetic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geodetic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readGeographicCompat
public static GeoCoordinateReferenceSystem readGeographicCompat(String text) throws IOException
Read a Backward Compatible Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjectedCompat
public static ProjectedCoordinateReferenceSystem readProjectedCompat(String text) throws IOException
Read a Backward Compatible Projected Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjectedGeodeticCompat
public static ProjectedCoordinateReferenceSystem readProjectedGeodeticCompat(String text) throws IOException
Read a Backward Compatible Projected Geodetic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Geodetic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readProjectedGeographicCompat
public static ProjectedCoordinateReferenceSystem readProjectedGeographicCompat(String text) throws IOException
Read a Backward Compatible Projected Geographic Coordinate Reference System from the well-known text- Parameters:
text- well-known text- Returns:
- Projected Geographic Coordinate Reference System
- Throws:
IOException- upon failure to read
-
getTextReader
public TextReader getTextReader()
Get the text reader- Returns:
- text reader
-
isStrict
public boolean isStrict()
Is strict rule enforcement enabled- Returns:
- true if strict
-
setStrict
public void setStrict(boolean strict)
Set the strict rule enforcement setting- Parameters:
strict- true for strict enforcement
-
reset
public void reset() throws IOExceptionReset the reader- Throws:
IOException- upon reset error
-
close
public void close()
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
read
public CRS read() throws IOException
Read a CRS object from the well-known text- Returns:
- CRS
- Throws:
IOException- upon failure to read
-
readCoordinateReferenceSystem
public CoordinateReferenceSystem readCoordinateReferenceSystem() throws IOException
Read a Coordinate Reference System from the well-known text- Returns:
- Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readSimpleCoordinateReferenceSystem
public SimpleCoordinateReferenceSystem readSimpleCoordinateReferenceSystem() throws IOException
Read a Simple Coordinate Reference System from the well-known text- Returns:
- Simple Coordinate Reference System
- Throws:
IOException- upon failure to read
-
readKeyword
public CRSKeyword readKeyword() throws IOException
Read a WKT CRS keyword- Returns:
- keyword
- Throws:
IOException- upon failure to read
-
readKeywords
public Set<CRSKeyword> readKeywords() throws IOException
Read WKT CRS keywords- Returns:
- keywords
- Throws:
IOException- upon failure to read
-
readKeyword
public CRSKeyword readKeyword(CRSKeyword... keywords) throws IOException
Read a specific WKT CRS keyword, next token when strict, until found when not- Parameters:
keywords- read until one of the keywords- Returns:
- keyword read
- Throws:
IOException- upon failure to read
-
readToKeyword
public CRSKeyword readToKeyword(CRSKeyword... keywords) throws IOException
Read skipping tokens up until before an optional WKT CRS keyword- Parameters:
keywords- read until one of the keywords- Returns:
- next keyword or null
- Throws:
IOException- upon failure to read
-
readKeyword
public CRSKeyword readKeyword(boolean required, CRSKeyword... keywords) throws IOException
Read looking for a specific WKT CRS keyword, skipping others if not strict mode- Parameters:
required- true if keyword is required, read only until an external right delimiterkeywords- read until one of the keywords- Returns:
- keyword read
- Throws:
IOException- upon failure to read
-
peekKeyword
public CRSKeyword peekKeyword() throws IOException
Peek a WKT CRS keyword- Returns:
- keyword
- Throws:
IOException- upon failure to read
-
peekKeywords
public Set<CRSKeyword> peekKeywords() throws IOException
Peek WKT CRS keywords- Returns:
- keywords
- Throws:
IOException- upon failure to read
-
peekOptionalKeyword
public CRSKeyword peekOptionalKeyword() throws IOException
Peek an optional WKT CRS keyword- Returns:
- keyword
- Throws:
IOException- upon failure to read
-
peekOptionalKeywords
public Set<CRSKeyword> peekOptionalKeywords() throws IOException
Peek an optional WKT CRS keywords- Returns:
- keywords
- Throws:
IOException- upon failure to read
-
peekOptionalKeyword
public CRSKeyword peekOptionalKeyword(int num) throws IOException
Peek an optional WKT CRS keyword- Parameters:
num- number of tokens out to peek at- Returns:
- keyword
- Throws:
IOException- upon failure to read
-
peekOptionalKeywords
public Set<CRSKeyword> peekOptionalKeywords(int num) throws IOException
Peek an optional WKT CRS keywords- Parameters:
num- number of tokens out to peek at- Returns:
- keywords
- Throws:
IOException- upon failure to read
-
readLeftDelimiter
public void readLeftDelimiter() throws IOExceptionRead a left delimiter- Throws:
IOException- upon failure to read
-
peekLeftDelimiter
public boolean peekLeftDelimiter() throws IOExceptionPeek if the next token is a left delimiter- Returns:
- true if next token is a left delimiter
- Throws:
IOException- upon failure to read
-
readRightDelimiter
public void readRightDelimiter() throws IOExceptionRead skipping tokens until an external right delimiter (first right delimiter without a preceding left)- Throws:
IOException- upon failure to read
-
peekRightDelimiter
public boolean peekRightDelimiter() throws IOExceptionPeek if the next token is a right delimiter- Returns:
- true if next token is a right delimiter
- Throws:
IOException- upon failure to read
-
readSeparator
public void readSeparator() throws IOExceptionRead a WKT Separator (comma)- Throws:
IOException- upon failure to read
-
peekSeparator
public boolean peekSeparator() throws IOExceptionPeek if the next token is a WKT Separator (comma)- Returns:
- true if next token is a separator
- Throws:
IOException- upon failure to read
-
readEnd
public void readEnd() throws IOException"Read" an expected end, checking for unexpected trailing tokens- Throws:
IOException- upon failure to read
-
readKeywordDelimitedToken
public String readKeywordDelimitedToken(CRSKeyword keyword) throws IOException
Read a keyword delimited token- Parameters:
keyword- expected keyword- Returns:
- token
- Throws:
IOException- upon failure to read
-
readGeo
public CoordinateReferenceSystem readGeo() throws IOException
Read a Geodetic or Geographic CRS- Returns:
- geodetic, geographic, or derived coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjected
public ProjectedCoordinateReferenceSystem readProjected() throws IOException
Read a Projected CRS- Returns:
- projected coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedGeodetic
public ProjectedCoordinateReferenceSystem readProjectedGeodetic() throws IOException
Read a Projected Geodetic CRS- Returns:
- projected geodetic coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedGeographic
public ProjectedCoordinateReferenceSystem readProjectedGeographic() throws IOException
Read a Projected Geographic CRS- Returns:
- projected geographic coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjected
public ProjectedCoordinateReferenceSystem readProjected(CRSType expectedBaseType) throws IOException
Read a Projected CRS- Parameters:
expectedBaseType- expected base coordinate reference system type- Returns:
- projected coordinate reference system
- Throws:
IOException- upon failure to read
-
readVertical
public CoordinateReferenceSystem readVertical() throws IOException
Read a Vertical CRS- Returns:
- vertical coordinate reference system
- Throws:
IOException- upon failure to read
-
readEngineering
public CoordinateReferenceSystem readEngineering() throws IOException
Read an Engineering CRS- Returns:
- engineering coordinate reference system
- Throws:
IOException- upon failure to read
-
readParametric
public CoordinateReferenceSystem readParametric() throws IOException
Read a Parametric CRS- Returns:
- parametric coordinate reference system
- Throws:
IOException- upon failure to read
-
readTemporal
public CoordinateReferenceSystem readTemporal() throws IOException
Read a Temporal CRS- Returns:
- temporal coordinate reference system
- Throws:
IOException- upon failure to read
-
readDerivedProjected
public DerivedCoordinateReferenceSystem readDerivedProjected() throws IOException
Read a Derived Projected CRS- Returns:
- derived coordinate reference system
- Throws:
IOException- upon failure to read
-
readCompound
public CompoundCoordinateReferenceSystem readCompound() throws IOException
Read a Compound CRS- Returns:
- compound coordinate reference system
- Throws:
IOException- upon failure to read
-
readCoordinateMetadata
public CoordinateMetadata readCoordinateMetadata() throws IOException
Read Coordinate Metadata- Returns:
- coordinate metadata
- Throws:
IOException- upon failure to read
-
readCoordinateOperation
public CoordinateOperation readCoordinateOperation() throws IOException
Read Coordinate Operation- Returns:
- coordinate operation
- Throws:
IOException- upon failure to read
-
readPointMotionOperation
public PointMotionOperation readPointMotionOperation() throws IOException
Read Point Motion Operation- Returns:
- point motion operation
- Throws:
IOException- upon failure to read
-
readConcatenatedOperation
public ConcatenatedOperation readConcatenatedOperation() throws IOException
Read Concatenated Operation- Returns:
- concatenated operation
- Throws:
IOException- upon failure to read
-
readBound
public BoundCoordinateReferenceSystem readBound() throws IOException
Read a Bound CRS- Returns:
- bound coordinate reference system
- Throws:
IOException- upon failure to read
-
readScopeExtentIdentifierRemark
public void readScopeExtentIdentifierRemark(ScopeExtentIdentifierRemark object) throws IOException
Read the usages (scope and extent), identifiers, and remark into the object- Parameters:
object- scope extent identifier remark object- Throws:
IOException- upon failure to read
-
readGeoReferenceFrame
public GeoReferenceFrame readGeoReferenceFrame() throws IOException
Read a Geo reference frame- Returns:
- geo reference frame
- Throws:
IOException- upon failure to read
-
readGeoReferenceFrame
public GeoReferenceFrame readGeoReferenceFrame(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Geo reference frame- Parameters:
crs- coordinate reference system- Returns:
- geo reference frame
- Throws:
IOException- upon failure to read
-
readVerticalReferenceFrame
public VerticalReferenceFrame readVerticalReferenceFrame() throws IOException
Read a Vertical reference frame- Returns:
- vertical reference frame
- Throws:
IOException- upon failure to read
-
readVerticalReferenceFrame
public VerticalReferenceFrame readVerticalReferenceFrame(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Vertical reference frame- Parameters:
crs- coordinate reference system- Returns:
- vertical reference frame
- Throws:
IOException- upon failure to read
-
readEngineeringDatum
public EngineeringDatum readEngineeringDatum() throws IOException
Read an Engineering datum- Returns:
- engineering datum
- Throws:
IOException- upon failure to read
-
readEngineeringDatum
public EngineeringDatum readEngineeringDatum(SimpleCoordinateReferenceSystem crs) throws IOException
Read an Engineering datum- Parameters:
crs- coordinate reference system- Returns:
- engineering datum
- Throws:
IOException- upon failure to read
-
readParametricDatum
public ParametricDatum readParametricDatum() throws IOException
Read a Parametric datum- Returns:
- parametric datum
- Throws:
IOException- upon failure to read
-
readParametricDatum
public ParametricDatum readParametricDatum(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Parametric datum- Parameters:
crs- coordinate reference system- Returns:
- parametric datum
- Throws:
IOException- upon failure to read
-
readReferenceFrame
public ReferenceFrame readReferenceFrame() throws IOException
Read a Reference frame (datum)- Returns:
- reference frame
- Throws:
IOException- upon failure to read
-
readReferenceFrame
public ReferenceFrame readReferenceFrame(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Reference frame (datum)- Parameters:
crs- coordinate reference system- Returns:
- reference frame
- Throws:
IOException- upon failure to read
-
readGeoDatumEnsemble
public GeoDatumEnsemble readGeoDatumEnsemble() throws IOException
Read a Geo datum ensemble- Returns:
- geo datum ensemble
- Throws:
IOException- upon failure to read
-
readVerticalDatumEnsemble
public VerticalDatumEnsemble readVerticalDatumEnsemble() throws IOException
Read a Vertical datum ensemble- Returns:
- vertical datum ensemble
- Throws:
IOException- upon failure to read
-
readDatumEnsemble
public DatumEnsemble readDatumEnsemble() throws IOException
Read a Datum ensemble- Returns:
- datum ensemble
- Throws:
IOException- upon failure to read
-
readDatumEnsembleMember
public DatumEnsembleMember readDatumEnsembleMember() throws IOException
Read a Datum ensemble member- Returns:
- datum ensemble member
- Throws:
IOException- upon failure to read
-
readDynamic
public Dynamic readDynamic() throws IOException
Read a Dynamic coordinate reference system- Returns:
- dynamic
- Throws:
IOException- upon failure to read
-
readPrimeMeridian
public PrimeMeridian readPrimeMeridian() throws IOException
Read a Prime meridian- Returns:
- prime meridian
- Throws:
IOException- upon failure to read
-
readEllipsoid
public Ellipsoid readEllipsoid() throws IOException
Read an Ellipsoid- Returns:
- ellipsoid
- Throws:
IOException- upon failure to read
-
readUnit
public Unit readUnit() throws IOException
Read a Unit- Returns:
- unit
- Throws:
IOException- upon failure to read
-
readAngleUnit
public Unit readAngleUnit() throws IOException
Read an Angle Unit- Returns:
- angle unit
- Throws:
IOException- upon failure to read
-
readLengthUnit
public Unit readLengthUnit() throws IOException
Read a Length Unit- Returns:
- length unit
- Throws:
IOException- upon failure to read
-
readParametricUnit
public Unit readParametricUnit() throws IOException
Read a Parametric Unit- Returns:
- parametric unit
- Throws:
IOException- upon failure to read
-
readScaleUnit
public Unit readScaleUnit() throws IOException
Read a Scale Unit- Returns:
- scale unit
- Throws:
IOException- upon failure to read
-
readTimeUnit
public Unit readTimeUnit() throws IOException
Read a Time Unit- Returns:
- time unit
- Throws:
IOException- upon failure to read
-
readUnit
public Unit readUnit(UnitType type) throws IOException
Read a Unit- Parameters:
type- expected unit type- Returns:
- unit
- Throws:
IOException- upon failure to read
-
readIdentifiers
public List<Identifier> readIdentifiers() throws IOException
Read Identifiers- Returns:
- identifiers
- Throws:
IOException- upon failure to read
-
readIdentifier
public Identifier readIdentifier() throws IOException
Read an Identifier- Returns:
- identifier
- Throws:
IOException- upon failure to read
-
readCoordinateSystem
public CoordinateSystem readCoordinateSystem() throws IOException
Read a Coordinate system- Returns:
- coordinate system
- Throws:
IOException- upon failure to read
-
readAxes
public List<Axis> readAxes() throws IOException
Read Axes- Returns:
- axes
- Throws:
IOException- upon failure to read
-
readAxes
public List<Axis> readAxes(CoordinateSystemType type) throws IOException
Read Axes- Parameters:
type- coordinate system type- Returns:
- axes
- Throws:
IOException- upon failure to read
-
readAxis
public Axis readAxis() throws IOException
Read an Axis- Returns:
- axis
- Throws:
IOException- upon failure to read
-
readAxis
public Axis readAxis(CoordinateSystemType type) throws IOException
Read an Axis- Parameters:
type- coordinate system type- Returns:
- axis
- Throws:
IOException- upon failure to read
-
readRemark
public String readRemark() throws IOException
Read Remark- Returns:
- remark
- Throws:
IOException- upon failure to read
-
readUsages
public List<Usage> readUsages() throws IOException
Read Usages- Returns:
- usages
- Throws:
IOException- upon failure to read
-
readUsage
public Usage readUsage() throws IOException
Read a Usage- Returns:
- usage
- Throws:
IOException- upon failure to read
-
readScope
public String readScope() throws IOException
Read a Scope- Returns:
- scope
- Throws:
IOException- upon failure to read
-
readExtent
public Extent readExtent() throws IOException
Read an Extent- Returns:
- extent
- Throws:
IOException- upon failure to read
-
readAreaDescription
public String readAreaDescription() throws IOException
Read an Area description- Returns:
- area description
- Throws:
IOException- upon failure to read
-
readGeographicBoundingBox
public GeographicBoundingBox readGeographicBoundingBox() throws IOException
Read a Geographic bounding box- Returns:
- geographic bounding box
- Throws:
IOException- upon failure to read
-
readVerticalExtent
public VerticalExtent readVerticalExtent() throws IOException
Read a Vertical extent- Returns:
- vertical extent
- Throws:
IOException- upon failure to read
-
readTemporalExtent
public TemporalExtent readTemporalExtent() throws IOException
Read a Temporal extent- Returns:
- temporal extent
- Throws:
IOException- upon failure to read
-
readMapProjection
public MapProjection readMapProjection() throws IOException
Read a Map projection- Returns:
- map projection
- Throws:
IOException- upon failure to read
-
readMethod
public OperationMethod readMethod() throws IOException
Read an operation method- Returns:
- operation method
- Throws:
IOException- upon failure to read
-
readProjectedParameters
public List<OperationParameter> readProjectedParameters() throws IOException
Read projected parameters- Returns:
- operation parameters
- Throws:
IOException- upon failure to read
-
readParameters
public List<OperationParameter> readParameters(CRSType type) throws IOException
Read Operation parameters- Parameters:
type- coordinate reference system type- Returns:
- operation parameters
- Throws:
IOException- upon failure to read
-
readParameter
public OperationParameter readParameter(CRSType type) throws IOException
Read an Operation parameter- Parameters:
type- coordinate reference system type- Returns:
- operation parameter
- Throws:
IOException- upon failure to read
-
readTemporalDatum
public TemporalDatum readTemporalDatum() throws IOException
Read a Temporal Datum- Returns:
- temporal datum
- Throws:
IOException- upon failure to read
-
readDerivingConversion
public DerivingConversion readDerivingConversion() throws IOException
Read a Deriving Conversion- Returns:
- deriving conversion
- Throws:
IOException- upon failure to read
-
readDerivedParameters
public List<OperationParameter> readDerivedParameters() throws IOException
Read Derived parameters- Returns:
- derived parameters
- Throws:
IOException- upon failure to read
-
readParametersAndFiles
public List<OperationParameter> readParametersAndFiles(CRSType type) throws IOException
Read Operation parameters and parameter files- Parameters:
type- coordinate reference system type- Returns:
- operation parameters
- Throws:
IOException- upon failure to read
-
readParameterFile
public OperationParameter readParameterFile() throws IOException
Read an Operation parameter file- Returns:
- operation parameter file
- Throws:
IOException- upon failure to read
-
readCoordinateOperationParameters
public List<OperationParameter> readCoordinateOperationParameters() throws IOException
Read Coordinate Operation parameters- Returns:
- parameters
- Throws:
IOException- upon failure to read
-
readVersion
public String readVersion() throws IOException
Read an operation version- Returns:
- operation version
- Throws:
IOException- upon failure to read
-
readSource
public CoordinateReferenceSystem readSource() throws IOException
Read a source coordinate reference system- Returns:
- source crs
- Throws:
IOException- upon failure to read
-
readTarget
public CoordinateReferenceSystem readTarget() throws IOException
Read a target coordinate reference system- Returns:
- target crs
- Throws:
IOException- upon failure to read
-
readInterpolation
public CoordinateReferenceSystem readInterpolation() throws IOException
Read a interpolation coordinate reference system- Returns:
- interpolation crs
- Throws:
IOException- upon failure to read
-
readCoordinateReferenceSystem
public CoordinateReferenceSystem readCoordinateReferenceSystem(CRSKeyword keyword) throws IOException
Read a coordinate reference system with the keyword- Parameters:
keyword- CRS keyword- Returns:
- crs
- Throws:
IOException- upon failure to read
-
readAccuracy
public double readAccuracy() throws IOExceptionRead an operation accuracy- Returns:
- operation accuracy
- Throws:
IOException- upon failure to read
-
readAccuracyText
public String readAccuracyText() throws IOException
Read an operation accuracy- Returns:
- operation accuracy
- Throws:
IOException- upon failure to read- Since:
- 1.1.0
-
readPointMotionOperationParameters
public List<OperationParameter> readPointMotionOperationParameters() throws IOException
Read Point Motion Operation parameters- Returns:
- parameters
- Throws:
IOException- upon failure to read
-
readAbridgedCoordinateTransformation
public AbridgedCoordinateTransformation readAbridgedCoordinateTransformation() throws IOException
Read an Abridged Coordinate Transformation- Returns:
- abridged coordinate transformation
- Throws:
IOException- upon failure to read
-
readBoundParameters
public List<OperationParameter> readBoundParameters() throws IOException
Read Bound CRS Abridged Transformation parameters- Returns:
- parameters
- Throws:
IOException- upon failure to read
-
readGeoCompat
public GeoCoordinateReferenceSystem readGeoCompat() throws IOException
Read a Backward Compatible Geodetic or Geographic CRS- Returns:
- geodetic or geographic coordinate reference system
- Throws:
IOException- upon failure to read
-
readGeodeticCompat
public GeoCoordinateReferenceSystem readGeodeticCompat() throws IOException
Read a Backward Compatible Geodetic CRS- Returns:
- geodetic coordinate reference system
- Throws:
IOException- upon failure to read
-
readGeographicCompat
public GeoCoordinateReferenceSystem readGeographicCompat() throws IOException
Read a Backward Compatible Geographic CRS- Returns:
- geographic coordinate reference system
- Throws:
IOException- upon failure to read
-
readGeoCompat
public GeoCoordinateReferenceSystem readGeoCompat(CRSType expectedType) throws IOException
Read a Backward Compatible Geodetic or Geographic CRS- Parameters:
expectedType- expected coordinate reference system type- Returns:
- geodetic or geographic coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedCompat
public ProjectedCoordinateReferenceSystem readProjectedCompat() throws IOException
Read a Backward Compatible Projected CRS- Returns:
- projected coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedGeodeticCompat
public ProjectedCoordinateReferenceSystem readProjectedGeodeticCompat() throws IOException
Read a Backward Compatible Projected Geodetic CRS- Returns:
- projected geodetic coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedGeographicCompat
public ProjectedCoordinateReferenceSystem readProjectedGeographicCompat() throws IOException
Read a Backward Compatible Projected Geographic CRS- Returns:
- projected geographic coordinate reference system
- Throws:
IOException- upon failure to read
-
readProjectedCompat
public ProjectedCoordinateReferenceSystem readProjectedCompat(CRSType expectedBaseType) throws IOException
Read a Backward Compatible Projected CRS- Parameters:
expectedBaseType- expected base coordinate reference system type- Returns:
- projected coordinate reference system
- Throws:
IOException- upon failure to read
-
addTransformParameters
public static void addTransformParameters(String[] transform, MapProjection mapProjection)
Add transform parameters to the map projection- Parameters:
transform- transform arraymapProjection- map projection
-
readVerticalCompat
public VerticalCoordinateReferenceSystem readVerticalCompat() throws IOException
Read a Backward Compatible Vertical CRS- Returns:
- vertical coordinate reference system
- Throws:
IOException- upon failure to read
-
readEngineeringCompat
public EngineeringCoordinateReferenceSystem readEngineeringCompat() throws IOException
Read a Backward Compatible Engineering CRS- Returns:
- engineering coordinate reference system
- Throws:
IOException- upon failure to read
-
readMapProjectionCompat
public MapProjection readMapProjectionCompat() throws IOException
Read a Backward Compatible map projection- Returns:
- map projection
- Throws:
IOException- upon failure to read
-
readCoordinateSystemCompat
public CoordinateSystem readCoordinateSystemCompat(CRSType type, ReferenceFrame datum) throws IOException
Read a Backward Compatible Coordinate System- Parameters:
type- coordinate reference system typedatum- reference frame- Returns:
- coordinate system
- Throws:
IOException- upon failure to read
-
readVerticalDatumCompat
public VerticalReferenceFrame readVerticalDatumCompat() throws IOException
Read a Backward Compatible vertical datum- Returns:
- vertical reference frame
- Throws:
IOException- upon failure to read
-
readVerticalDatumCompat
public VerticalReferenceFrame readVerticalDatumCompat(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Backward Compatible vertical datum- Parameters:
crs- coordinate reference system- Returns:
- vertical reference frame
- Throws:
IOException- upon failure to read
-
readEngineeringDatumCompat
public EngineeringDatum readEngineeringDatumCompat() throws IOException
Read a Backward Compatible engineering datum- Returns:
- engineering datum
- Throws:
IOException- upon failure to read
-
readEngineeringDatumCompat
public EngineeringDatum readEngineeringDatumCompat(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Backward Compatible engineering datum- Parameters:
crs- coordinate reference system- Returns:
- engineering datum
- Throws:
IOException- upon failure to read
-
readDatumCompat
public ReferenceFrame readDatumCompat() throws IOException
Read a Backward Compatible datum- Returns:
- reference frame
- Throws:
IOException- upon failure to read
-
readDatumCompat
public ReferenceFrame readDatumCompat(SimpleCoordinateReferenceSystem crs) throws IOException
Read a Backward Compatible datum- Parameters:
crs- coordinate reference system- Returns:
- reference frame
- Throws:
IOException- upon failure to read
-
readToWGS84Compat
public String[] readToWGS84Compat() throws IOException
Read a Backward Compatible To WGS84 transformation- Returns:
- abridged transformation
- Throws:
IOException- upon failure to read
-
readExtensionsCompat
public Map<String,Object> readExtensionsCompat() throws IOException
Read Backward Compatible Extensions- Returns:
- extensions
- Throws:
IOException- upon failure to read
-
-