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
Python renderer for OpenStreetMap with custom icons intended to display as many map features as possible

Map Machine project consists of Python OpenStreetMap renderer: SVG map generation, SVG and PNG tile generation, Röntgen icon set: unique CC-BY 4.0 map

Sergey Vartanov 0 Dec 18, 2022
Read images to numpy arrays

mahotas-imread: Read Image Files IO with images and numpy arrays. Mahotas-imread is a simple module with a small number of functions: imread Reads an

Luis Pedro Coelho 67 Jan 07, 2023
Creates 3D geometries from 2D vector graphics, for use in geodynamic models

geomIO - creating 3D geometries from 2D input This is the Julia and Python version of geomIO, a free open source software to generate 3D volumes and s

3 Feb 01, 2022
Starlite-tile38 - Showcase using Tile38 via pyle38 in a Starlite application

Starlite-Tile38 Showcase using Tile38 via pyle38 in a Starlite application. Repo

Ben 8 Aug 07, 2022
Asynchronous Client for the worlds fastest in-memory geo-database Tile38

This is an asynchonous Python client for Tile38 that allows for fast and easy interaction with the worlds fastest in-memory geodatabase Tile38.

Ben 53 Dec 29, 2022
Water Detect Algorithm

WaterDetect Synopsis WaterDetect is an end-to-end algorithm to generate open water cover mask, specially conceived for L2A Sentinel 2 imagery from MAJ

142 Dec 30, 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
Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Ayush Mishra 3 May 06, 2022
Spatial Interpolation Toolbox is a Python-based GUI that is able to interpolate spatial data in vector format.

Spatial Interpolation Toolbox This is the home to Spatial Interpolation Toolbox, a graphical user interface (GUI) for interpolating geographic vector

Michael Ward 2 Nov 01, 2021
Google maps for Jupyter notebooks

gmaps gmaps is a plugin for including interactive Google maps in the IPython Notebook. Let's plot a heatmap of taxi pickups in San Francisco: import g

Pascal Bugnion 747 Dec 19, 2022
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
A Python framework for building geospatial web-applications

Hey there, this is Greppo... A Python framework for building geospatial web-applications. Greppo is an open-source Python framework that makes it easy

Greppo 304 Dec 27, 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
WIP: extracting Geometry utilities from datacube-core

odc.geo This is still work in progress. This repository contains geometry related code extracted from Open Datacube. For details and motivation see OD

Open Data Cube 34 Jan 09, 2023
This program analizes films database with adresses, and creates a folium map with closest films to the coordinates

Films-map-project UCU CS lab 1.2, 1st year This program analizes films database with adresses, and creates a folium map with closest films to the coor

Artem Moskovets 1 Feb 09, 2022
Python interface to PROJ (cartographic projections and coordinate transformations library)

pyproj Python interface to PROJ (cartographic projections and coordinate transformations library). Documentation Stable: http://pyproj4.github.io/pypr

832 Dec 31, 2022
Digital Earth Australia notebooks and tools repository

Repository for Digital Earth Australia Jupyter Notebooks: tools and workflows for geospatial analysis with Open Data Cube and xarray

Geoscience Australia 335 Dec 24, 2022
Solving the Traveling Salesman Problem using Self-Organizing Maps

Solving the Traveling Salesman Problem using Self-Organizing Maps This repository contains an implementation of a Self Organizing Map that can be used

Diego Vicente 3.1k Dec 31, 2022
Rasterio reads and writes geospatial raster datasets

Rasterio Rasterio reads and writes geospatial raster data. Geographic information systems use GeoTIFF and other formats to organize and store gridded,

Mapbox 1.9k Jan 07, 2023
ESMAC diags - Earth System Model Aerosol-Cloud Diagnostics Package

Earth System Model Aerosol-Cloud Diagnostics Package This Earth System Model (ES

Pacific Northwest National Laboratory 1 Jan 04, 2022