LINDER: Land use INDexER
A pipeline for calculating land cover over urban/rural areas.
How to use?
A quick demo:
from pathlib import Path
import linder as ld
# get a list of CSV files of calculated land cover fractions of all downloaded images
list_path_fraction = ld.get_land_cover(
51.515070,
-0.008555,
51.489564,
0.034932,
"2016-01-01",
"2017-10-01",
path_GUF="Data/GUF/WSF2015_v1_EPSG4326/WSF2015_v1_EPSG4326",
path_save=Path("~/Downloads/linder_res").expanduser(),
)
# synthesise the above results to one `DataFrame`
df_lc = ld.proc_fraction(list_path_fraction)
Required libraries
Grass
for macOS, download and install the grass package:
http://grassmac.wikidot.com/downloads
other python libraries
use conda to create a fresh environment for this pipeline:
conda env create -f GDAL.yml
Dependency details refer to GDAL.yml.
Dependency datasets
nc_spm_08 dataset
This dataset includes projection files required by GRASS.
download it here.
GUF dataset (optional)
GUF (Global Urban Footprint) is a global urban coverage dataset produced by DLR.
This pipeline use GUF to improve accuracy in predicting urban features.
configuration
sentinel-hub
refer to this page for setting up a new configuration.
Then update the sentinelhub instance ID as follows:
sentinelhub.config --instance_id [your-instance-ID]
details
This is a pipeline for calculating the landcover over desired regions. It includes:
-
Step 1: Getting the location of the region (
latandlon) -
Step 2: Getting the satellite image for the desired region
-
Step 3: Prediction of the land cover into 3 categories:
- 1-Urban
- 2-Green
- 3-Water and
- 4-other
-
Step 4: Overlaying the GUF data into the prediction. Therefore the landcover becomes 1-Water 2-Green 3-Urban 4-Other
-
Step 5: Overlaying the building data from OSM or Microsoft data (only for the US). Therefore, the final land cover includes 1-Water 2-Green 3-Buildings 4-Paved 5-Others
Using this pipeline is as simple as choosing the coordinates, and providing the GUF data and/or building data. The user can choose which data is available. For example, in the case of no GUF data, the pipeline uses the prediction, or in the case of no Microsoft data, the pipeline uses the OSM data for buildings. Note that adding GUF data makes the final result of the landcover more accurate.
Some technical details:
-
Merging various maps might be very computationally expensive, and the current Python packages like GDAL are not very efficient. The pipeline instead uses a python interface to use GRASS functions (such as
v.overlay) directly to speed up the merging processes. -
The pipeline uses a pre-trained model to predict the land cover. Currently, the model is trained over Colombo, but various tests has shown it has a good performance on other places as well. A more sophisticated model can be trained by using more datasets.
-
Note that while OSM data are automatically fetched from the website for the desired region, the Microsoft data need to be downloaded for the chosen location manually. This can be automated in the future.
Some examples
Colombo, Sri Lanka
Pittsburgh, United States
Metadata
Release files for linder 2020.6.3.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| linder-2020.6.3.2-py3-none-any.whl | Python 3 | none | any | Details for linder-2020.6.3.2-py3-none-any.whl |
Release files / linder-2020.6.3.2-py3-none-any.whl
| Download URL | linder-2020.6.3.2-py3-none-any.whl |
|---|---|
| Size | 323.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69ade88a8e80c1a7d875d6c79b5e2cfb5d33d1ea7f6d381cbaed08a83505b65c
|
|
BLAKE2b-256 checksum How to use checksums |
35314c985351ffc5524a80c5ae232c33dd98bffa04c40593bfab900a23dbe36c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.3
|
Security for linder 2020.6.3.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.