exactextract.writer
Classes
Writes the results of summary operations to a desired format |
|
Creates GeoJSON-like features |
|
Creates a (Geo)Pandas DataFrame |
|
Creates QGSVectorLayer |
|
Writes results using GDAL/OGR |
Module Contents
- class exactextract.writer.Writer[source]
Writes the results of summary operations to a desired format
- class exactextract.writer.JSONWriter(*, array_type: str = 'numpy', map_fields: Mapping[str, Tuple[str]] | None = None)[source]
Creates GeoJSON-like features
- Parameters:
array_type – type that should be used to represent array outputs. either “numpy” (default), “list”, or “set”
map_fields – an optional dictionary of fields to be created by interpreting one field as keys and another as values, in the format
{ dst_field : (src_keys, src_vals) }
. for example, the fields “values” and “frac” would be combined into a field called “frac_map” usingmap_fields = {"frac_map": ("values", "frac")}
.
- class exactextract.writer.GDALWriter(dataset=None, *, filename=None, driver=None, layer_name='', srs_wkt=None)[source]
Writes results using GDAL/OGR
- Parameters:
dataset – a
gdal.Dataset
orogr.DataSource
to which results should be created in a new layerfilename – file to write results to, if
dataset
isNone
driver – driver to use when creating
filename
layer_name – name of new layer to create in output dataset
srs_wkt – spatial reference system to assign to output dataset. No coordinate transformation will be performed.