Satellie extraction and cutter
Project description
Introduction
This program can be used to automate/make easier the extraction/cutting of satellite data from the netherlands space office (NSO). NSO provides free satellite data for the Netherlands, a downside however is that the NSO provides a very large region and as such a very large file. This leads to a unnecessary large amount of data, if you only want to study a smaller specific region.
This repo cuts a selected region out of the original file, provided that the selected region is smaller than the original file. And then saves this cutout thus reducing the unnecessary saved data. While also calculating the Normalized difference vegetation index (NVDI, used in crop analysis) of the cutout region. We are working on more variables.
And it can also automate the downloading process instead of manual clicking all the download links at https://www.satellietdataportaal.nl/
Getting Started
- Get a NSO account, register at https://satellietdataportaal.nl/register.php
- First get a GeoJSON file of the region you want to cut. Geojson.io can you help you with that.
- Make a instance of nso_geojsonregion with instance of the geojson region you have, where you want to store the cropped files and the NSO account based on step 0.
- Retrieve download links for the specific region you want to have.
- Download the found links.
Example code.
# This the way the import nso.
import satellite_images_nso.api.nso_georegion as nso
path_geojson = "C:/repos/satellite_images/nso/data/solleveld.geojson"
# The first parameter is the path to the geojson, the second the map where the cropped satellite data will be installed
georegion = nso.nso_georegion(path_geojson,"C:/repos/Output/",\
YOUR_USER_NAME_HERE,\
YOUR_PASSWORD_HERE)
# This method fetches all the download links to all the satelliet images which contain region in the geojson.
links = georegion.retrieve_download_links()
# Downloads a satelliet image from the NSO, make a crop out of it so it fits the geojson region and calculate the NVDI index.
# The output will stored in the designated output folder.
georegion.execute_link(links[0])
Installation.
Install this package with: pip install satellite_images_nso
Be sure you've installed GDAL already on your computer. Other python dependencies will install automatically (Fiona>=1.8.13, GDAL>=3.0.4, geopandas>=0.7.0, rasterio>=1.1.3 Shapely>=1.7.0)
Install GDAL on Windows
If you are a Windows user you have to install the GDAL dependency yourself via a wheels.
Instead install these wheels with pip install XXX.XX.XX.whl.
Go to https://www.lfd.uci.edu/~gohlke/pythonlibs/ for the wheels of these depencies:
Depencencies are : "Fiona>=1.8.13", "GDAL>=3.0.4", "geopandas>=0.7.0","rasterio>=1.1.3","Shapely>=1.7.0"
Install GDAL on MacOS
Install GDAL by using Brew:
brew install GDAL
Local development
Run rebuild.bat
to build and install package on local computer.
Author
Michael de Winter
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file satellite_images_nso-1.1.2.tar.gz
.
File metadata
- Download URL: satellite_images_nso-1.1.2.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ff1e2ae1b795040e8f3fcb4a767cc4d1e4f85ad41380d49c7de6c456a6aca6c |
|
MD5 | 077addb77015e0b19745447b9f81b78b |
|
BLAKE2b-256 | 0f9475c9743166639501c35e675ad0324222ee23300dad4b963af89e1d7e5631 |
File details
Details for the file satellite_images_nso-1.1.2-py3-none-any.whl
.
File metadata
- Download URL: satellite_images_nso-1.1.2-py3-none-any.whl
- Upload date:
- Size: 13.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.54.1 CPython/3.9.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a1dce7adb5901b889fe940f6d45258906b5c2d7ae8d08aadafc57fdbb6ae6c4 |
|
MD5 | 7edfbbabfaad5662ac9c875f3e59e9a3 |
|
BLAKE2b-256 | 883853840a097f43f04cb9c8448a24c72996f2bbb31300b2c29272d98048e7ee |