Object
Geometry

public class Geometry extends Object
Represents the metadata for a geometry column in a GeoParquet file, including required encoding and geometry types, and optional attributes like bounding box, CRS, and edge type.
  • Field Details

  • Constructor Details

    • Geometry

      public Geometry()
  • Method Details

    • bounds

      public Envelope bounds()
      Creates an envelope from the bounding box information.
      Returns:
      the envelope representing this geometry's bounds
    • getEncoding

      public String getEncoding()
      Gets the encoding format for this geometry column.
      Returns:
      the encoding format (e.g., "WKB", "point", etc.)
    • setEncoding

      public void setEncoding(String encoding)
      Sets the encoding format for this geometry column.
      Parameters:
      encoding - the encoding format
    • getGeometryTypes

      public List<String> getGeometryTypes()
      Gets the geometry types supported in this column.
      Returns:
      the list of geometry types
    • setGeometryTypes

      public void setGeometryTypes(List<String> geometryTypes)
      Sets the geometry types supported in this column.
      Parameters:
      geometryTypes - the list of geometry types
    • getCrs

      public CoordinateReferenceSystem getCrs()
      Gets the coordinate reference system for this geometry column.

      The CRS is represented using a strongly-typed PROJJSON model object that follows the v0.7 schema as defined by the OGC GeoParquet specification. This includes proper handling of CRS identifiers with authority and code properties.

      This method returns the CRS as parsed from the GeoParquet metadata 'geo' field. If no CRS information is available in the metadata, this method returns null.

      Returns:
      the CRS as a strongly-typed PROJJSON model object, or null if not specified
    • setCrs

      public void setCrs(CoordinateReferenceSystem crs)
      Sets the coordinate reference system for this geometry column.

      The CRS should be provided as a strongly-typed PROJJSON model object following the v0.7 schema as defined by the OGC GeoParquet specification. This includes proper handling of CRS identifiers with authority and code properties.

      This method allows setting the CRS information that will be used when building GeoParquet metadata for the 'geo' field.

      Parameters:
      crs - the CRS as a strongly-typed PROJJSON model object
    • getEdges

      public String getEdges()
      Gets the edge type for this geometry.
      Returns:
      the edge type (e.g., "spherical", "planar")
    • setEdges

      public void setEdges(String edges)
      Sets the edge type for this geometry.
      Parameters:
      edges - the edge type
    • getOrientation

      public String getOrientation()
      Gets the orientation for this geometry.
      Returns:
      the orientation (e.g., "counterclockwise")
    • setOrientation

      public void setOrientation(String orientation)
      Sets the orientation for this geometry.
      Parameters:
      orientation - the orientation
    • getBbox

      public List<Double> getBbox()
      Gets the bounding box for this geometry column.
      Returns:
      the bounding box coordinates (minx, miny, [minz], maxx, maxy, [maxz])
    • setBbox

      public void setBbox(List<Double> bbox)
      Sets the bounding box for this geometry column.
      Parameters:
      bbox - the bounding box coordinates
    • getEpoch

      public Double getEpoch()
      Gets the epoch for this geometry's CRS.
      Returns:
      the epoch value
    • setEpoch

      public void setEpoch(Double epoch)
      Sets the epoch for this geometry's CRS.
      Parameters:
      epoch - the epoch value
    • getCovering

      public Covering getCovering()
      Gets the covering metadata for this geometry column.
      Returns:
      the covering metadata
    • setCovering

      public void setCovering(Covering covering)
      Sets the covering metadata for this geometry column.
      Parameters:
      covering - the covering metadata