API Docs

Documentation for the package’s Python API for usage as a library.

The main function is

geoextent.fromFile(input, bbox, time)

It takes raw data (in the form of a string, boolean, boolean) to output result based on these fields.

Parameters:
  • input: a string value of input file or path

  • bbox: a boolean value to extract spatial extent (bounding box)

  • time: a boolean value to extract temporal extent

Examples

Extract bounding box from a single file

Code:

geoextent.fromFile('muenster_ring_zeit.geojson', True, False)

Output:

{'format': 'application/geojson',
 'bbox': [7.60168075561523,
  51.9488147720619,
  7.64725685119629,
  51.9746240298775],
 'crs': 4326}

(source of file muenster_ring_zeit.geojson)

Extracting time interval from a single file

Code:

geoextent.fromFile('muenster_ring_zeit.geojson', False, True)

Output:

{'format': 'application/geojson',
 'crs': 4326,
 'tbox': ['2018-11-14', '2018-11-14']}

(source of file muenster_ring_zeit.geojson)

Extracting both bounding box and time interval from a single file

Code:

geoextent.fromFile('muenster_ring_zeit.geojson', True, True)

Output:

{'format': 'application/geojson',
 'tbox': ['2018-11-14', '2018-11-14'],
 'crs': 4326,
 'bbox': [7.60168075561523,
  51.9488147720619,
  7.64725685119629,
  51.9746240298775]}

(source of file muenster_ring_zeit.geojson)