Package mil.nga.geopackage.extension
Class CrsWktExtension
- java.lang.Object
-
- mil.nga.geopackage.extension.BaseExtension
-
- mil.nga.geopackage.extension.CrsWktExtension
-
public class CrsWktExtension extends BaseExtension
OGC Well known text representation of Coordinate Reference Systems extension- Since:
- 1.1.8
- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFINITION_COLUMN_DEF
Extension definition column definitionstatic String
DEFINITION_COLUMN_NAME
Extension definition column namestatic String
DEFINITION_V_1
Extension version 1 definition URLstatic String
DEFINITION_V_1_1
Extension version 1.1 definition URLstatic String
EPOCH_COLUMN_DEF
Extension epoch column definitionstatic String
EPOCH_COLUMN_NAME
Extension epoch column namestatic String
EXTENSION_NAME
Extension namestatic String
NAME
Name-
Fields inherited from class mil.nga.geopackage.extension.BaseExtension
extensionsDao, geoPackage
-
-
Constructor Summary
Constructors Constructor Description CrsWktExtension(GeoPackageCore geoPackage)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDefinition(long srsId)
Get the extension definitionDouble
getEpoch(long srsId)
Get the extension epochString
getExtensionName(CrsWktExtensionVersion version)
Get the extension name for the versionList<Extensions>
getOrCreate()
Get or create the latest version of the extensionList<Extensions>
getOrCreate(CrsWktExtensionVersion version)
Get or create the version of the extensionboolean
has()
Determine if the GeoPackage has any version of the extensionboolean
has(CrsWktExtensionVersion version)
Determine if the GeoPackage has the version of the extensionboolean
hasDefinitionColumn()
Determine if the GeoPackage SRS table has the extension definition columnboolean
hasEpochColumn()
Determine if the GeoPackage SRS table has the extension epoch columnboolean
hasMinimum(CrsWktExtensionVersion version)
Determine if the GeoPackage has at least the minimum version of the extensionvoid
removeExtension()
Remove the extension.void
removeExtension(CrsWktExtensionVersion version)
Remove the extension.void
updateDefinition(long srsId, String definition)
Update the extension definitionvoid
updateEpoch(long srsId, Double epoch)
Update the extension epoch-
Methods inherited from class mil.nga.geopackage.extension.BaseExtension
createDao, get, getExtensions, getExtensions, getExtensionsDao, getGeoPackage, getOrCreate, has, has, has, verifyWritable
-
-
-
-
Field Detail
-
NAME
public static final String NAME
Name- See Also:
- Constant Field Values
-
EXTENSION_NAME
public static final String EXTENSION_NAME
Extension name- See Also:
- Constant Field Values
-
DEFINITION_V_1
public static final String DEFINITION_V_1
Extension version 1 definition URL
-
DEFINITION_V_1_1
public static final String DEFINITION_V_1_1
Extension version 1.1 definition URL
-
DEFINITION_COLUMN_NAME
public static final String DEFINITION_COLUMN_NAME
Extension definition column name- Since:
- 6.6.0
-
DEFINITION_COLUMN_DEF
public static final String DEFINITION_COLUMN_DEF
Extension definition column definition- Since:
- 6.6.0
-
EPOCH_COLUMN_NAME
public static final String EPOCH_COLUMN_NAME
Extension epoch column name- Since:
- 6.6.0
-
EPOCH_COLUMN_DEF
public static final String EPOCH_COLUMN_DEF
Extension epoch column definition- Since:
- 6.6.0
-
-
Constructor Detail
-
CrsWktExtension
public CrsWktExtension(GeoPackageCore geoPackage)
Constructor- Parameters:
geoPackage
- GeoPackage
-
-
Method Detail
-
getOrCreate
public List<Extensions> getOrCreate()
Get or create the latest version of the extension- Returns:
- extension
- Since:
- 6.6.0
-
getOrCreate
public List<Extensions> getOrCreate(CrsWktExtensionVersion version)
Get or create the version of the extension- Parameters:
version
- extension version- Returns:
- extension
- Since:
- 6.6.0
-
has
public boolean has()
Determine if the GeoPackage has any version of the extension- Returns:
- true if has extension
-
hasMinimum
public boolean hasMinimum(CrsWktExtensionVersion version)
Determine if the GeoPackage has at least the minimum version of the extension- Parameters:
version
- extension version- Returns:
- true if has extension minimum
- Since:
- 6.6.0
-
has
public boolean has(CrsWktExtensionVersion version)
Determine if the GeoPackage has the version of the extension- Parameters:
version
- extension version- Returns:
- true if has extension
- Since:
- 6.6.0
-
getExtensionName
public String getExtensionName(CrsWktExtensionVersion version)
Get the extension name for the version- Parameters:
version
- extension version- Returns:
- extension name
- Since:
- 6.6.0
-
updateDefinition
public void updateDefinition(long srsId, String definition)
Update the extension definition- Parameters:
srsId
- srs iddefinition
- definition
-
getDefinition
public String getDefinition(long srsId)
Get the extension definition- Parameters:
srsId
- srs id- Returns:
- definition
-
updateEpoch
public void updateEpoch(long srsId, Double epoch)
Update the extension epoch- Parameters:
srsId
- srs idepoch
- epoch- Since:
- 6.6.0
-
getEpoch
public Double getEpoch(long srsId)
Get the extension epoch- Parameters:
srsId
- srs id- Returns:
- epoch
- Since:
- 6.6.0
-
hasDefinitionColumn
public boolean hasDefinitionColumn()
Determine if the GeoPackage SRS table has the extension definition column- Returns:
- true if has column
- Since:
- 6.6.0
-
hasEpochColumn
public boolean hasEpochColumn()
Determine if the GeoPackage SRS table has the extension epoch column- Returns:
- true if has column
- Since:
- 6.6.0
-
removeExtension
public void removeExtension()
Remove the extension. Leaves the column and values.- Since:
- 3.2.0
-
removeExtension
public void removeExtension(CrsWktExtensionVersion version)
Remove the extension. Leaves the column and values.- Parameters:
version
- extension version- Since:
- 6.6.0
-
-