spatialcells.utils

Utility functions for spatialcells, especially for import/export.

exportRegion

spatialcells.utils.exportRegion(region, filename)[source]

Export a region to a file. The file type is determined by the file extension.

Parameters:
  • region – The region/boundary object to export.

  • filename – The name of the file to export to.

Returns:

geojson string

importRegion

spatialcells.utils.importRegion(filename, scale=1.0)[source]

Import a region from a file. The file type is determined by the file extension.

Parameters:
  • filename – The name of the file to import from.

  • scale – The scale factor to apply to the coordinates.

Returns:

region/boundary object