semantique.geometry

Contents

semantique.geometry#

semantique.geometry(x, **kwargs)[source]#

Spatial geometry object.

Object representing a spatial vector geometry, such as a point, a line, or a polygon. Can be used to apply a spatial filter to an array.

Parameters:
  • x – A spatial feature formatted as an object that can be understood by the initializer of SpatialExtent. This includes geopandas.GeoDataFrame objects. If multiple features are given they will be unioned into a multi-geometry, e.g. a multi-point, multi-linestring or multi-polygon.

  • **kwargs – Additional keyword arguments passed on to the initializer of SpatialExtent.

Returns:

dict – JSON-serializable object that contains the spatial vector geometry, and can be understood by the query processor as such.

Examples

>>> import semantique as sq
>>> import geopandas as gpd
>>> sq.geometry(gpd.read_file("files/parcels.geojson"))