Package com.luciad.formats.geopackage
Class GeoPackageFeatureModelCreateOptions.Builder
java.lang.Object
com.luciad.formats.geopackage.GeoPackageFeatureModelCreateOptions.Builder
- All Implemented Interfaces:
AutoCloseable
- Enclosing class:
GeoPackageFeatureModelCreateOptions
public static final class GeoPackageFeatureModelCreateOptions.Builder
extends Object
implements AutoCloseable
Builder for the GeoPackage model create options.- Since:
- 2024.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the GeoPackage feature model create options.voidclose()coordinateReference(CoordinateReference coordinateReference) Thecoordinate referencewhich is used in the newIFeatureModel.Thedata typeon which the newIFeatureModelis based.protected voidfinalize()luciadExtensionsEnabled(boolean enable) Sets whether the GeoPackage feature model gets the Luciad specific extensions.overwriteExistingTables(boolean overwrite) Whether an existing table with the same name should be overwritten, or if it should result in an error.Sets a custom table name for the given data type.
-
Constructor Details
-
Builder
-
-
Method Details
-
finalize
protected void finalize() -
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
build
Builds the GeoPackage feature model create options.Setting the data type and coordinate reference is mandatory.
- Returns:
- the options for the GeoPackage model encoder.
- Throws:
IllegalStateException- if not all mandatory parameters are set.
-
dataType
- Parameters:
dataType- the data type.- Returns:
- this builder.
-
tableName
@NotNull public GeoPackageFeatureModelCreateOptions.Builder tableName(@NotNull String tableName) throws IllegalArgumentException Sets a custom table name for the given data type.If not called, the data type's name (possibly sanitized to be spec compliant) will be used by default.
The table name must be compliant with the GeoPackage spec. To ensure that the table name is supported, only use names that
- consist of alphanumerical characters and underscores,
- start with an alphabetical letter, and
- don't use multiple underscores in succession.
- Parameters:
tableName- a custom table name.- Returns:
- this builder.
- Throws:
IllegalArgumentException- when the table name is not compliant with the GeoPackage spec.- Since:
- 2025.0
-
coordinateReference
@NotNull public GeoPackageFeatureModelCreateOptions.Builder coordinateReference(@NotNull CoordinateReference coordinateReference) throws IllegalArgumentException Thecoordinate referencewhich is used in the newIFeatureModel.Calling this function is mandatory.
- Parameters:
coordinateReference- the coordinate reference.- Returns:
- this builder.
- Throws:
IllegalArgumentException- coordinateReference may not benull.
-
luciadExtensionsEnabled
Sets whether the GeoPackage feature model gets the Luciad specific extensions.These extensions include:
- lcdx_geom_CIRCLE the Luciad circle geometry.
- lcdx_geom_ELLIPSE the Luciad ellipse geometry.
- lcdx_geom_ELLIPTICALARC the Luciad elliptical arc geometry.
With these extensions the geopackage accepts the following geometries:
- a
Patchcontaining aCircleByCenterPoint - a
Patchcontaining aEllipse - an
EllipticalArc
Calling this function is optional. The default value is true.
- Parameters:
enable- whether the new feature model has Luciad specific extensions.- Returns:
- this builder.
-
overwriteExistingTables
@NotNull public GeoPackageFeatureModelCreateOptions.Builder overwriteExistingTables(boolean overwrite) Whether an existing table with the same name should be overwritten, or if it should result in an error.Defaults to false; which means a conflict results in an error. Setting this to true means the existing data is overwritten with an empty table.
- Parameters:
overwrite- whether an existing table with the same name should be overwritten.- Returns:
- this builder.
- See Also:
-