A toolbox for processing earth observation data with Python.

Related tags

Geolocationeo-box
Overview

Build Status Docs Status

eo-box

eobox is a Python package with a small collection of tools for working with Remote Sensing / Earth Observation data.

Package Overview

So far, the following subpackages are available:

  • eobox.sampledata contains small sample data that can be used for playing around and testing.

  • eobox.raster contains raster processing tools for

    • extracting raster values at given (by vector data) locations,

    • window- / chunk-wise processing of multiple single layer raster files that do not fit in memory, e.g.

      • calculating virtual time series and temporal statistical metrics from all cloud-free observations,

      • predicting a machine learning model,

      • custom processing functions.

  • eobox.vector contains vector processing tools for

    • clean convertion of polygons to lines and

    • distance-to-polygon border calculation.

  • eobox.ml contains machine learning related tools, e.g.

    • plotting a confusion matrix including with precision and recall

    • extended predict function which returns prediction, confidences, and probabilities.

Installation

The package requires Python 3. It can be installed with the following command:

pip install eobox

The environment.yaml in the repository can be used to setup a conda environment with all dependencies required for using and building the package and running the tests and documentation code.

conda env create --name=eobox --file=environment.yml
pip install eobox

Documentation

The package documentation can be found at readthedocs.

Comments
  • Module convert_df_to_geodf not found

    Module convert_df_to_geodf not found

    hi @benmack. I am having an issue (I am using eobox version 0.3.1.). Python version 3.6.10. I can import fine eobox.

    import convert_df_to_geodf

    Error

    ---------------------------------------------------------------------------
    ModuleNotFoundError                       Traceback (most recent call last)
    <ipython-input-22-bb79235e32c0> in <module>
    ----> 1 import convert_df_to_geodf
    
    ModuleNotFoundError: No module named 'convert_df_to_geodf'
    

    Thank you!

    opened by elsadg 2
  • Change the internal package structure back to standard

    Change the internal package structure back to standard

    from v0.0.3 onwards the package will have a simple structure again, i.e. it will not be possible to install the sub-pacakges independently. I started to set it up like this to learn and understand, however it makes it more difficult to extend and maintain the package and since it is rather a playground and learning package the easier way seems better to me now.

    So Up to v0.0.2 you read this in the READMY:

    The structure of this project has been created following the eo-learn project of Sinergise. For a package containing diverse functionalities as it is envisaged for this package as well, it is convincing to subdivide the pacakge into "several subpackages according to different functionalities and external package dependencies".

    But that will change.

    enhancement 
    opened by benmack 1
  • error when running extraction

    error when running extraction

    Hello, I want to want to do pixel-based processing with eo-box. I am following the blog post in https://benmack.github.io/blog/2020-01-06-1_federsee-blog-series_part-3_clf/ to do so. I have one tif image and a shapefile with some polygons (same projection). The error I get when I run the extraction is the following:

    CalledProcessError: Command 'C:\DIR\lib\site-packages\GDAL-3.1.4-py3.7-win-amd64.egg-info\scripts\gdal_proximity.py C:\DIR\TEMPDIR_aux_vector_dist2pb_5yp1nyvy\interim_sample_vector_dataset_lines.tif C:\DIR\aux_vector_dist2pb.tif -ot Float32 -distunits PIXEL -values 1 -maxdist 255' returned non-zero exit status 1.

    Any idea what might be wrong?

    opened by Sananvalinta 1
  • Create docker image to handle non-root users

    Create docker image to handle non-root users

    Build a docker image for running jupyterlab in a container with a non-root user, e.g.

    docker run -u $(id -u $USER):$(id -g $USER) -v ${PWD}:/home/eoboxer/lucas-hls -p 8888:8888 benmack/eobox:latest

    This is currently not possible and throws an exeption (see below).

    The problem is that on the one hand we need a geospatial setup on the other hand we need a proper jupyter setup. Both can be tricky. Options for base images:

    • https://github.com/OSGeo/gdal - relatively slim geo option
    • https://jupyter-docker-stacks.readthedocs.io/en/latest/ - slim jupyter options
    • https://github.com/SCiO-systems/cgspatial-notebook - very large option that might contain both

    Current exception

    docker run -u $(id -u $USER):$(id -g $USER) -v ${PWD}:/home/eoboxer/lucas-hls -p 8888:8888 benmack/eobox:latest
    Traceback (most recent call last):
      File "/usr/local/lib/python3.8/dist-packages/traitlets/traitlets.py", line 528, in get
        value = obj._trait_values[self.name]
    KeyError: 'runtime_dir'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/usr/local/bin/jupyter-notebook", line 8, in <module>
        sys.exit(main())
      File "/usr/local/lib/python3.8/dist-packages/jupyter_core/application.py", line 270, in launch_instance
        return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 663, in launch_instance
        app.initialize(argv)
      File "<decorator-gen-7>", line 2, in initialize
      File "/usr/local/lib/python3.8/dist-packages/traitlets/config/application.py", line 87, in catch_config_error
        return method(app, *args, **kwargs)
      File "/usr/local/lib/python3.8/dist-packages/notebook/notebookapp.py", line 1766, in initialize
        self.init_configurables()
      File "/usr/local/lib/python3.8/dist-packages/notebook/notebookapp.py", line 1380, in init_configurables
        connection_dir=self.runtime_dir,
      File "/usr/local/lib/python3.8/dist-packages/traitlets/traitlets.py", line 556, in __get__
        return self.get(obj, cls)
      File "/usr/local/lib/python3.8/dist-packages/traitlets/traitlets.py", line 535, in get
        value = self._validate(obj, dynamic_default())
      File "/usr/local/lib/python3.8/dist-packages/jupyter_core/application.py", line 100, in _runtime_dir_default
        ensure_dir_exists(rd, mode=0o700)
      File "/usr/local/lib/python3.8/dist-packages/jupyter_core/utils/__init__.py", line 13, in ensure_dir_exists
        os.makedirs(path, mode=mode)
      File "/usr/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/lib/python3.8/os.py", line 213, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/usr/lib/python3.8/os.py", line 223, in makedirs
        mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/.local'
    
    opened by benmack 0
  • Extraction: store user-given numeric columns from vector file as pixel level .npy file

    Extraction: store user-given numeric columns from vector file as pixel level .npy file

    This makes sense since at the moment we only store the polygon ID but usually we want to frequently work with at least the class ID which we have stored in the vector file.

    At the moment the user has to join that data on the pixel level by himself. But we could do that in the extraction function or provide as a separate function which works on top of an existing extraction folder.

    enhancement 
    opened by benmack 0
  • Implement EOCubeSceneCollection method for statistical metrics

    Implement EOCubeSceneCollection method for statistical metrics

    Practically we only need to wrap what ther is already in ./examples/raster/cube_custom_functions_with_eocubescenecollection.ipynb in a method like EOCubeSceneCollection.create_virtual_time_series

    enhancement 
    opened by benmack 0
  • Create Intro to EOCubeSceneCollection class

    Create Intro to EOCubeSceneCollection class

    See what parts are useful of the following ones:

    • ./examples/raster/cube_calculate_virtual_time_series_with_eocube.ipynb

    • ./examples/raster/cube_eocubescenecollection_and_virtual_time_series.ipynb

    documentation 
    opened by benmack 0
Geospatial Image Processing for Python

GIPPY Gippy is a Python library for image processing of geospatial raster data. The core of the library is implemented as a C++ library, libgip, with

GIPIT 83 Aug 19, 2022
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 763 Dec 26, 2022
How to use COG's (Cloud optimized GeoTIFFs) with Rasterio

How to use COG's (Cloud optimized GeoTIFFs) with Rasterio According to Cogeo.org: A Cloud Opdtimized GeoTIFF (COG) is a regular GeoTIFF file, aimed at

Marvin Gabler 8 Jul 29, 2022
Using SQLAlchemy with spatial databases

GeoAlchemy GIS Support for SQLAlchemy. Introduction GeoAlchemy is an extension of SQLAlchemy. It provides support for Geospatial data types at the ORM

109 Dec 01, 2022
Open GeoJSON data on geojson.io

geojsonio.py Open GeoJSON data on geojson.io from Python. geojsonio.py also contains a command line utility that is a Python port of geojsonio-cli. Us

Jacob Wasserman 114 Dec 21, 2022
A Python interface between Earth Engine and xarray

eexarray A Python interface between Earth Engine and xarray Description eexarray was built to make processing gridded, mesoscale time series data quic

Aaron Zuspan 159 Dec 23, 2022
pure-Python (Numpy optional) 3D coordinate conversions for geospace ecef enu eci

Python 3-D coordinate conversions Pure Python (no prerequistes beyond Python itself) 3-D geographic coordinate conversions and geodesy. API similar to

Geospace code 292 Dec 29, 2022
This repository contains the scripts to derivate the ENU and ECEF coordinates from the longitude, latitude, and altitude values encoded in the NAD83 coordinates.

This repository contains the scripts to derivate the ENU and ECEF coordinates from the longitude, latitude, and altitude values encoded in the NAD83 coordinates.

Luigi Cruz 1 Feb 07, 2022
Streamlit Component for rendering Folium maps

streamlit-folium This Streamlit Component is a work-in-progress to determine what functionality is desirable for a Folium and Streamlit integration. C

Randy Zwitch 224 Dec 30, 2022
Specification for storing geospatial vector data (point, line, polygon) in Parquet

GeoParquet About This repository defines how to store geospatial vector data (point, lines, polygons) in Apache Parquet, a popular columnar storage fo

Open Geospatial Consortium 449 Dec 27, 2022
A proof-of-concept jupyter extension which converts english queries into relevant python code

Text2Code for Jupyter notebook A proof-of-concept jupyter extension which converts english queries into relevant python code. Blog post with more deta

DeepKlarity 2.1k Dec 29, 2022
Script that allows to download data with satellite's orbit height and create CSV with their change in time.

Satellite orbit height ◾ Requirements Python = 3.8 Packages listen in reuirements.txt (run pip install -r requirements.txt) Account on Space Track ◾

Alicja Musiał 2 Jan 17, 2022
leafmap - A Python package for geospatial analysis and interactive mapping in a Jupyter environment.

A Python package for geospatial analysis and interactive mapping with minimal coding in a Jupyter environment

Qiusheng Wu 1.4k Jan 02, 2023
ProjPicker (projection picker) is a Python module that allows the user to select all coordinate reference systems (CRSs)

ProjPicker ProjPicker (projection picker) is a Python module that allows the user to select all coordinate reference systems (CRSs) whose extent compl

Huidae Cho 4 Feb 06, 2022
Blender addons to make the bridge between Blender and geographic data

Blender GIS Blender minimal version : 2.8 Mac users warning : currently the addon does not work on Mac with Blender 2.80 to 2.82. Please do not report

5.9k Jan 02, 2023
Raster processing benchmarks for Python and R packages

Raster processing benchmarks This repository contains a collection of raster processing benchmarks for Python and R packages. The tests cover the most

Krzysztof Dyba 13 Oct 24, 2022
A NASA MEaSUREs project to provide automated, low latency, global glacier flow and elevation change datasets

Notebooks A NASA MEaSUREs project to provide automated, low latency, global glacier flow and elevation change datasets This repository provides tools

NASA Jet Propulsion Laboratory 27 Oct 25, 2022
Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python

geojson-area Calculate the area inside of any GeoJSON geometry. This is a port of Mapbox's geojson-area for Python. Installation $ pip install area U

Alireza 87 Dec 14, 2022
OSMnx: Python for street networks. Retrieve, model, analyze, and visualize street networks and other spatial data from OpenStreetMap.

OSMnx OSMnx is a Python package that lets you download geospatial data from OpenStreetMap and model, project, visualize, and analyze real-world street

Geoff Boeing 4k Jan 08, 2023
Python bindings to libpostal for fast international address parsing/normalization

pypostal These are the official Python bindings to https://github.com/openvenues/libpostal, a fast statistical parser/normalizer for street addresses

openvenues 651 Dec 16, 2022