Supported file formats

The library supports the following file formats. Please see the project issues for upcoming formats and feature requests.


Supported formats:
- GeoJSON (.geojson)
- Tabular data (.csv)
- GeoTIFF (.geotiff, .tif)
- Shapefile (.shp)
- GeoPackage (.gpkg)
- GPS Exchange Format (.gpx)
- Geography Markup Language (.gml)
- Keyhole Markup Language (.kml)



Examples

GeoJSON

The file used in the example can be in the code repository: muenster_ring_zeit.geojson.

geoextent -b -t muenster_ring_zeit.geojson
{'format': 'geojson',
 'geoextent_handler': 'handleVector',
 'tbox': ['2018-11-14', '2018-11-14'],
 'bbox': [7.6016807556152335,
  51.94881477206191,
  7.647256851196289,
  51.974624029877454],
 'crs': '4326'}

CSV

Different CSV delimiters (;, ,) are automatically detected. Supported column names, by using Regular expressions operations, are as follows:

  • Latitude - (.)*latitude(.)* - ^lat - lat$ - ^y - y$

  • Longitude - (.)*longitude" - (.)*long(.) - ^lon - lon$ - (.)*lng(.)* - ^x - x$

  • Time - (.)*timestamp(.)* - (.)*datetime(.)* - (.)*time(.)* - ^date - date$

The file used in the example can be obtained from Zenodo Sandbox record 256820.

geoextent -b -t cities_NL.csv
{'format': 'csv',
 'geoextent_handler': 'handleCSV',
 'bbox': [4.3175, 51.434444, 6.574722, 53.217222],
 'crs': '4326',
 'tbox': ['2018-09-30', '2018-09-30']}

GeoTIFF

The file used in the example is available online: wf_100m_klas.tif.

geoextent -b wf_100m_klas.tif
{'format': 'tif',
 'geoextent_handler': 'handleRaster',
 'bbox': [5.915300756475311,
  50.310251974108326,
  9.468398712484138,
  52.530775532873264],
 'crs': '4326'}

Shapefile

The file used in the example can be found at Geofabrik: shapefiles_toulouse.zip.

geoextent -b gis_osm_buildings_a_07_1.shp
Archive:  shapefiles_toulouse.zip
 extracting: gis_osm_adminareas_a_07_1.cpg  
  inflating: gis_osm_adminareas_a_07_1.dbf  
  inflating: gis_osm_adminareas_a_07_1.prj  
  inflating: gis_osm_adminareas_a_07_1.shp  
  inflating: gis_osm_adminareas_a_07_1.shx  
 extracting: gis_osm_barriers_07_1.cpg  
  inflating: gis_osm_barriers_07_1.dbf  
  inflating: gis_osm_barriers_07_1.prj  
  inflating: gis_osm_barriers_07_1.shp  
  inflating: gis_osm_barriers_07_1.shx  
 extracting: gis_osm_boundaries_07_1.cpg  
  inflating: gis_osm_boundaries_07_1.dbf  
  inflating: gis_osm_boundaries_07_1.prj  
  inflating: gis_osm_boundaries_07_1.shp  
  inflating: gis_osm_boundaries_07_1.shx  
 extracting: gis_osm_buildings_a_07_1.cpg  
  inflating: gis_osm_buildings_a_07_1.dbf  

  inflating: gis_osm_buildings_a_07_1.prj  
  inflating: gis_osm_buildings_a_07_1.shp  

  inflating: gis_osm_buildings_a_07_1.shx  
 extracting: gis_osm_coastline_07_1.cpg  
  inflating: gis_osm_coastline_07_1.dbf  
  inflating: gis_osm_coastline_07_1.prj  
  inflating: gis_osm_coastline_07_1.shp  
  inflating: gis_osm_coastline_07_1.shx  
 extracting: gis_osm_landuse_a_07_1.cpg  
  inflating: gis_osm_landuse_a_07_1.dbf  
  inflating: gis_osm_landuse_a_07_1.prj  
  inflating: gis_osm_landuse_a_07_1.shp  
  inflating: gis_osm_landuse_a_07_1.shx  
 extracting: gis_osm_natural_07_1.cpg  
  inflating: gis_osm_natural_07_1.dbf  
  inflating: gis_osm_natural_07_1.prj  
  inflating: gis_osm_natural_07_1.shp  
  inflating: gis_osm_natural_07_1.shx  
 extracting: gis_osm_natural_a_07_1.cpg  
  inflating: gis_osm_natural_a_07_1.dbf  
  inflating: gis_osm_natural_a_07_1.prj  
  inflating: gis_osm_natural_a_07_1.shp  
  inflating: gis_osm_natural_a_07_1.shx  
 extracting: gis_osm_nonop_07_1.cpg  
  inflating: gis_osm_nonop_07_1.dbf  
  inflating: gis_osm_nonop_07_1.prj  
  inflating: gis_osm_nonop_07_1.shp  
  inflating: gis_osm_nonop_07_1.shx  
 extracting: gis_osm_places_07_1.cpg  
  inflating: gis_osm_places_07_1.dbf  
  inflating: gis_osm_places_07_1.prj  
  inflating: gis_osm_places_07_1.shp  
  inflating: gis_osm_places_07_1.shx  
 extracting: gis_osm_places_a_07_1.cpg  
  inflating: gis_osm_places_a_07_1.dbf  
  inflating: gis_osm_places_a_07_1.prj  
  inflating: gis_osm_places_a_07_1.shp  
  inflating: gis_osm_places_a_07_1.shx  
 extracting: gis_osm_pofw_07_1.cpg   
  inflating: gis_osm_pofw_07_1.dbf   
  inflating: gis_osm_pofw_07_1.prj   
  inflating: gis_osm_pofw_07_1.shp   
  inflating: gis_osm_pofw_07_1.shx   
 extracting: gis_osm_pofw_a_07_1.cpg  
  inflating: gis_osm_pofw_a_07_1.dbf  
  inflating: gis_osm_pofw_a_07_1.prj  
  inflating: gis_osm_pofw_a_07_1.shp  
  inflating: gis_osm_pofw_a_07_1.shx  
 extracting: gis_osm_pois_07_1.cpg   
  inflating: gis_osm_pois_07_1.dbf   
  inflating: gis_osm_pois_07_1.prj   
  inflating: gis_osm_pois_07_1.shp   
  inflating: gis_osm_pois_07_1.shx   
 extracting: gis_osm_pois_a_07_1.cpg  
  inflating: gis_osm_pois_a_07_1.dbf  
  inflating: gis_osm_pois_a_07_1.prj  
  inflating: gis_osm_pois_a_07_1.shp  
  inflating: gis_osm_pois_a_07_1.shx  
 extracting: gis_osm_power_07_1.cpg  
  inflating: gis_osm_power_07_1.dbf  
  inflating: gis_osm_power_07_1.prj  
  inflating: gis_osm_power_07_1.shp  
  inflating: gis_osm_power_07_1.shx  
 extracting: gis_osm_power_a_07_1.cpg  
  inflating: gis_osm_power_a_07_1.dbf  
  inflating: gis_osm_power_a_07_1.prj  
  inflating: gis_osm_power_a_07_1.shp  
  inflating: gis_osm_power_a_07_1.shx  
 extracting: gis_osm_powerlines_07_1.cpg  
  inflating: gis_osm_powerlines_07_1.dbf  
  inflating: gis_osm_powerlines_07_1.prj  
  inflating: gis_osm_powerlines_07_1.shp  
  inflating: gis_osm_powerlines_07_1.shx  
 extracting: gis_osm_railways_07_1.cpg  
  inflating: gis_osm_railways_07_1.dbf  
  inflating: gis_osm_railways_07_1.prj  
  inflating: gis_osm_railways_07_1.shp  
  inflating: gis_osm_railways_07_1.shx  
 extracting: gis_osm_roads_07_1.cpg  
  inflating: gis_osm_roads_07_1.dbf  

  inflating: gis_osm_roads_07_1.prj  
  inflating: gis_osm_roads_07_1.shp  
  inflating: gis_osm_roads_07_1.shx  
 extracting: gis_osm_routes_07_1.cpg  
  inflating: gis_osm_routes_07_1.dbf  
  inflating: gis_osm_routes_07_1.prj  
  inflating: gis_osm_routes_07_1.shp  
  inflating: gis_osm_routes_07_1.shx  
 extracting: gis_osm_runways_07_1.cpg  
  inflating: gis_osm_runways_07_1.dbf  
  inflating: gis_osm_runways_07_1.prj  
  inflating: gis_osm_runways_07_1.shp  
  inflating: gis_osm_runways_07_1.shx  
 extracting: gis_osm_runways_a_07_1.cpg  
  inflating: gis_osm_runways_a_07_1.dbf  
  inflating: gis_osm_runways_a_07_1.prj  
  inflating: gis_osm_runways_a_07_1.shp  
  inflating: gis_osm_runways_a_07_1.shx  
 extracting: gis_osm_traffic_07_1.cpg  
  inflating: gis_osm_traffic_07_1.dbf  
  inflating: gis_osm_traffic_07_1.prj  
  inflating: gis_osm_traffic_07_1.shp  
  inflating: gis_osm_traffic_07_1.shx  
 extracting: gis_osm_traffic_a_07_1.cpg  
  inflating: gis_osm_traffic_a_07_1.dbf  
  inflating: gis_osm_traffic_a_07_1.prj  
  inflating: gis_osm_traffic_a_07_1.shp  
  inflating: gis_osm_traffic_a_07_1.shx  
 extracting: gis_osm_transport_07_1.cpg  
  inflating: gis_osm_transport_07_1.dbf  
  inflating: gis_osm_transport_07_1.prj  
  inflating: gis_osm_transport_07_1.shp  
  inflating: gis_osm_transport_07_1.shx  
 extracting: gis_osm_transport_a_07_1.cpg  
  inflating: gis_osm_transport_a_07_1.dbf  
  inflating: gis_osm_transport_a_07_1.prj  
  inflating: gis_osm_transport_a_07_1.shp  
  inflating: gis_osm_transport_a_07_1.shx  
 extracting: gis_osm_water_a_07_1.cpg  
  inflating: gis_osm_water_a_07_1.dbf  
  inflating: gis_osm_water_a_07_1.prj  
  inflating: gis_osm_water_a_07_1.shp  
  inflating: gis_osm_water_a_07_1.shx  
 extracting: gis_osm_waterways_07_1.cpg  
  inflating: gis_osm_waterways_07_1.dbf  
  inflating: gis_osm_waterways_07_1.prj  
  inflating: gis_osm_waterways_07_1.shp  
  inflating: gis_osm_waterways_07_1.shx  
{'format': 'shp',
 'geoextent_handler': 'handleVector',
 'bbox': [1.24951, 43.4682, 1.695996, 43.74498],
 'crs': '4326'}

GeoPackage

The file used in the example is available online: sample1_2.gpkg.

geoextent -b sample1_2.gpkg
{'format': 'gpkg',
 'geoextent_handler': 'handleVector',
 'bbox': [-178.2176055908203,
  18.921783447265625,
  -66.96926879882812,
  71.40624237060547],
 'crs': '4326'}

GPS Exchange Format

The file used in the example is available online: run.gpx.

geoextent -b run.gpx
{'format': 'gpx',
 'geoextent_handler': 'handleVector',
 'bbox': [-77.02575484290719,
  38.920014034956694,
  -77.01215906068683,
  38.92795957624912],
 'crs': '4326'}

Geography Markup Language

The file used in the example is available online: clc_1000_PT.gml.

geoextent -b clc_1000_PT.gml
{'format': 'gml',
 'geoextent_handler': 'handleVector',
 'bbox': [-17.54207, 32.39669, -6.95939, 39.30114],
 'crs': '4326'}

Keyhole Markup Language

The file used in the example is available online: KML_Samples.kml.

geoextent -b KML_Samples.kml
{'format': 'kml',
 'geoextent_handler': 'handleVector',
 'bbox': [-122.0860162273783,
  36.07954952145647,
  15.35832653742206,
  38.87291016281703],
 'crs': '4326'}