Class DGIWGGeoPackageUtils


  • public class DGIWGGeoPackageUtils
    extends Object
    DGIWG (Defence Geospatial Information Working Group) GeoPackage utilities
    Since:
    6.6.0
    Author:
    osbornb
    • Constructor Detail

      • DGIWGGeoPackageUtils

        public DGIWGGeoPackageUtils()
    • Method Detail

      • createTiles

        public static TileMatrixSet createTiles​(GeoPackageCore geoPackage,
                                                String table,
                                                String identifier,
                                                String description,
                                                BoundingBox informativeBounds,
                                                SpatialReferenceSystem srs,
                                                BoundingBox extentBounds)
        Create tiles table
        Parameters:
        geoPackage - GeoPackage
        table - table name
        identifier - contents identifier
        description - contents description
        informativeBounds - informative contents bounds
        srs - spatial reference system
        extentBounds - crs extent bounds
        Returns:
        created tile matrix set
      • createTileMatrices

        public static void createTileMatrices​(GeoPackageCore geoPackage,
                                              String table,
                                              BoundingBox boundingBox,
                                              long minZoom,
                                              long maxZoom,
                                              long matrixWidth,
                                              long matrixHeight)
        Create tile matrices for zoom levels
        Parameters:
        geoPackage - GeoPackage
        table - table name
        boundingBox - bounding box
        minZoom - min zoom level
        maxZoom - max zoom level
        matrixWidth - matrix width
        matrixHeight - matrix height
      • createTileMatrices

        public static void createTileMatrices​(GeoPackageCore geoPackage,
                                              String table,
                                              BoundingBox boundingBox,
                                              Collection<Long> zoomLevels,
                                              long matrixWidth,
                                              long matrixHeight)
        Create tile matrices for zoom levels
        Parameters:
        geoPackage - GeoPackage
        table - table name
        boundingBox - bounding box
        zoomLevels - zoom levels
        matrixWidth - matrix width
        matrixHeight - matrix height
      • createTileMatrix

        public static void createTileMatrix​(GeoPackageCore geoPackage,
                                            String table,
                                            BoundingBox boundingBox,
                                            long zoom,
                                            long matrixWidth,
                                            long matrixHeight)
        Create a tile matrix for a zoom level
        Parameters:
        geoPackage - GeoPackage
        table - table name
        boundingBox - bounding box
        zoom - zoom level
        matrixWidth - matrix width
        matrixHeight - matrix height
      • createTileMatrix

        public static void createTileMatrix​(GeoPackageCore geoPackage,
                                            String table,
                                            long zoom,
                                            long matrixWidth,
                                            long matrixHeight,
                                            double pixelXSize,
                                            double pixelYSize)
        Create a tile matrix for a zoom level
        Parameters:
        geoPackage - GeoPackage
        table - table name
        zoom - zoom level
        matrixWidth - matrix width
        matrixHeight - matrix height
        pixelXSize - pixel x size
        pixelYSize - pixel y size
      • createFeatures

        public static GeometryColumns createFeatures​(GeoPackageCore geoPackage,
                                                     String table,
                                                     String identifier,
                                                     String description,
                                                     BoundingBox bounds,
                                                     GeometryType geometryType,
                                                     DataType dataType,
                                                     List<FeatureColumn> columns,
                                                     SpatialReferenceSystem srs)
        Create features table
        Parameters:
        geoPackage - GeoPackage
        table - table name
        identifier - contents identifier
        description - contents description
        bounds - contents bounds
        geometryType - geometry type
        dataType - data type
        columns - feature columns
        srs - spatial reference system
        Returns:
        created tile matrix set
      • createMetadata

        public static void createMetadata​(GeoPackageCore geoPackage,
                                          Metadata metadata,
                                          MetadataReference reference)
        Create metadata and metadata reference
        Parameters:
        geoPackage - GeoPackage
        metadata - metadata
        reference - metadata reference
      • createMetadata

        public static void createMetadata​(GeoPackageCore geoPackage,
                                          Metadata metadata)
        Create metadata
        Parameters:
        geoPackage - GeoPackage
        metadata - metadata
      • createMetadataReference

        public static void createMetadataReference​(GeoPackageCore geoPackage,
                                                   Metadata metadata,
                                                   MetadataReference reference)
        Create metadata reference
        Parameters:
        geoPackage - GeoPackage
        metadata - the reference metadata
        reference - metadata reference
      • createMetadataReference

        public static void createMetadataReference​(GeoPackageCore geoPackage,
                                                   MetadataReference reference)
        Create metadata reference
        Parameters:
        geoPackage - GeoPackage
        reference - metadata reference
      • createGeoPackageSeriesMetadata

        public static MetadataReference createGeoPackageSeriesMetadata​(GeoPackageCore geoPackage,
                                                                       String uri,
                                                                       String metadata)
        Create GeoPackage metadata with a series scope and metadata reference
        Parameters:
        geoPackage - GeoPackage
        uri - URI
        metadata - metadata
        Returns:
        metadata reference
      • createGeoPackageDatasetMetadata

        public static MetadataReference createGeoPackageDatasetMetadata​(GeoPackageCore geoPackage,
                                                                        String uri,
                                                                        String metadata)
        Create GeoPackage metadata with a dataset scope and metadata reference
        Parameters:
        geoPackage - GeoPackage
        uri - URI
        metadata - metadata
        Returns:
        metadata reference
      • createGeoPackageMetadata

        public static MetadataReference createGeoPackageMetadata​(GeoPackageCore geoPackage,
                                                                 MetadataScopeType scope,
                                                                 String uri,
                                                                 String metadata)
        Create GeoPackage metadata and metadata reference
        Parameters:
        geoPackage - GeoPackage
        scope - metadata scope type
        uri - URI
        metadata - metadata
        Returns:
        metadata reference
      • wrapIfEmptyOrContainsWhitespace

        public static String wrapIfEmptyOrContainsWhitespace​(String value)
        Wrap the value in single quotes if an empty string or contains whitespace
        Parameters:
        value - value
        Returns:
        wrapped value
        Since:
        6.6.3