mapchete.formats.default.geojson module

Handles writing process output into a pyramid of GeoJSON files.

This output format is restricted to the geodetic (WGS84) projection because it is the only projection the GeoJSON spec supports.

output configuration parameters

output type has to be geodetic

mandatory

path: string

output directory

schema: key-value pairs

the schema is passed on to fiona - properties: key-value pairs (fields and field types, like “id: int” etc.) - geometry: output geometry type (Geometry, Point, MultiPoint, Line, MultiLine, Polygon, MultiPolygon)

class mapchete.formats.default.geojson.InputTile(tile, process)

Bases: InputTile

Target Tile representation of input data.

Parameters
tileTile
processMapcheteProcess
Attributes
tileTile
processMapcheteProcess
class mapchete.formats.default.geojson.OutputDataReader(output_params, **kwargs)

Bases: OutputDataReader

Output reader class for GeoJSON.

Parameters
output_paramsdictionary

output parameters from Mapchete file

Attributes
pathstring

path to output directory

file_extensionstring

file extension for output files (.geojson)

output_paramsdictionary

output parameters from Mapchete file

pixelbufferinteger

buffer around output tiles

pyramidtilematrix.TilePyramid

output TilePyramid

crsrasterio.crs.CRS

object describing the process coordinate reference system

sridstring

spatial reference ID of CRS (e.g. “{‘init’: ‘epsg:4326’}”)

METADATA = {'data_type': 'vector', 'driver_name': 'GeoJSON', 'mode': 'rw'}
class mapchete.formats.default.geojson.OutputDataWriter(output_params, **kwargs)

Bases: OutputDataWriter, OutputDataReader

METADATA = {'data_type': 'vector', 'driver_name': 'GeoJSON', 'mode': 'rw'}