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
Program that shows all the details of the given IP address. Build with Python and ipinfo.io API

ip-details This is a program that shows all the details of the given IP address. Build with Python and ipinfo.io API Usage To use this program, run th

4 Mar 01, 2022
🌐 Local tile server for viewing geospatial raster files with ipyleaflet

🌐 Local Tile Server for Geospatial Rasters Need to visualize a rather large raster (gigabytes) you have locally? This is for you. A Flask application

Bane Sullivan 192 Jan 04, 2023
A python package that extends Google Earth Engine.

A python package that extends Google Earth Engine GitHub: https://github.com/davemlz/eemont Documentation: https://eemont.readthedocs.io/ PyPI: https:

David Montero Loaiza 307 Jan 01, 2023
A package to fetch sentinel 2 Satellite data from Google.

Sentinel 2 Data Fetcher Installation Create a Virtual Environment and activate it. python3 -m venv venv . venv/bin/activate Install the Package via pi

1 Nov 18, 2021
PySAL: Python Spatial Analysis Library Meta-Package

Python Spatial Analysis Library PySAL, the Python spatial analysis library, is an open source cross-platform library for geospatial data science with

Python Spatial Analysis Library 1.1k Dec 18, 2022
h3-js provides a JavaScript version of H3, a hexagon-based geospatial indexing system.

h3-js The h3-js library provides a pure-JavaScript version of the H3 Core Library, a hexagon-based geographic grid system. It can be used either in No

Uber Open Source 648 Jan 07, 2023
A Python tool to display geolocation information in the traceroute.

IP2Trace Python IP2Trace Python is a Python tool allowing user to get IP address information such as country, region, city, latitude, longitude, zip c

IP2Location 22 Jan 08, 2023
Geocoding library for Python.

geopy geopy is a Python client for several popular geocoding web services. geopy makes it easy for Python developers to locate the coordinates of addr

geopy 3.8k Dec 30, 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
Download and process satellite imagery in Python using Sentinel Hub services.

Description The sentinelhub Python package allows users to make OGC (WMS and WCS) web requests to download and process satellite images within your Py

Sentinel Hub 659 Dec 23, 2022
Geocode rows in a SQLite database table

Geocode rows in a SQLite database table

Chris Amico 225 Dec 08, 2022
Track International space station with python

NASA-ISS-tracker Track International space station with python Modules import json import turtle import urllib.request import time import webbrowser i

Nikhil Yadav 8 Aug 12, 2021
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
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
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
Django model field that can hold a geoposition, and corresponding widget

django-geoposition A model field that can hold a geoposition (latitude/longitude), and corresponding admin/form widget. Prerequisites Starting with ve

Philipp Bosch 324 Oct 17, 2022
Calculate & view the trajectory and live position of any earth-orbiting satellite

satellite-visualization A cross-platform application to calculate & view the trajectory and live position of any earth-orbiting satellite in 3D. This

Space Technology and Astronomy Cell - Open Source Society 3 Jan 08, 2022
Python Data. Leaflet.js Maps.

folium Python Data, Leaflet.js Maps folium builds on the data wrangling strengths of the Python ecosystem and the mapping strengths of the Leaflet.js

6k Jan 02, 2023
A short term landscape evolution using a path sampling method to solve water and sediment flow continuity equations and model mass flows over complex topographies.

r.sim.terrain A short-term landscape evolution model that simulates topographic change for both steady state and dynamic flow regimes across a range o

Brendan Harmon 7 Oct 21, 2022
A set of utility functions for working with GeoJSON annotations in Kaibu

kaibu-utils A set of utility functions for working with Kaibu. Create a new repository Create a new repository and select imjoy-team/imjoy-python-temp

ImJoy Team 0 Dec 12, 2021