Usage as a Python library

This library can be used as a python library. The following examples intended to demonstrate the library usage.

This example shows how to extract bounding box from a single file

In [3]:
import geoextent.lib.extent as geoextent

geoextent.fromFile('tests/testdata/geojson/muenster_ring_zeit.geojson', True, False)
Out[3]:
{'format': 'application/geojson',
 'crs': 4326,
 'bbox': [7.60168075561523,
  51.9488147720619,
  7.64725685119629,
  51.9746240298775]}

This example shows how to extract time interval from a single file

In [4]:
import geoextent.lib.extent as geoextent

geoextent.fromFile('tests/testdata/geojson/muenster_ring_zeit.geojson', False, True)
Out[4]:
{'format': 'application/geojson', 'tbox': ['2018-11-14', '2018-11-14']}

This example shows how to extract both bounding box and time interval from a single file

In [5]:
import geoextent.lib.extent as geoextent

geoextent.fromFile('tests/testdata/geojson/muenster_ring_zeit.geojson', True, True)
Out[5]:
{'format': 'application/geojson',
 'tbox': ['2018-11-14', '2018-11-14'],
 'crs': 4326,
 'bbox': [7.60168075561523,
  51.9488147720619,
  7.64725685119629,
  51.9746240298775]}