JacobWeinbren / Tree-Cover

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tree Cover England

This project analyses tree cover and income deprivation data for Lower Layer Super Output Areas (LSOAs) in England.

Data Sources

Data Processing

The data processing is done using Python scripts located in the scripts directory:

  1. merge.py: Merges the tree cover and income deprivation data based on LSOA codes.
  2. process.py: Combines the merged data with the LSOAs GeoJSON file, updating the GeoJSON features with tree cover and income rank properties.
  3. intersect.py: Filters the updated LSOAs GeoJSON file and intersects it with the buildings data to create a new GeoJSON file with intersected buildings.

Commands

The following commands are used to generate vector tiles from the GeoJSON files:

Splits the large buildings file

    python scripts/split.py

Simplifies the large buildings files

    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part01.geojson -simplify 10% keep-shapes -o output/split/simplified_part01.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part02.geojson -simplify 10% keep-shapes -o output/split/simplified_part02.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part03.geojson -simplify 10% keep-shapes -o output/split/simplified_part03.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part04.geojson -simplify 10% keep-shapes -o output/split/simplified_part04.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part05.geojson -simplify 10% keep-shapes -o output/split/simplified_part05.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part06.geojson -simplify 10% keep-shapes -o output/split/simplified_part06.geojson
    node --max-old-space-size=32000 /usr/local/bin/mapshaper -i output/split/part07.geojson -simplify 10% keep-shapes -o output/split/simplified_part07.geojson

Combines the large building files

    python scripts/combine.py
    tippecanoe --output=output/filtered-LSOA.pmtiles \
           --layer="filteredLSOA" \
           --no-feature-limit \
           --no-tile-size-limit \
           --detect-shared-borders \
           --coalesce-fraction-as-needed \
           --coalesce-densest-as-needed \
           --coalesce-smallest-as-needed \
           --increase-gamma-as-needed \
           --coalesce \
           --reorder \
           --minimum-zoom=0 \
           --maximum-zoom=17 \
           --force \
           --simplification=20 \
           output/filtered_LSOA.geojson
    tippecanoe --output=output/tree-buildings.pmtiles \
           --layer="treeBuildings" \
           --no-feature-limit \
           --no-tile-size-limit \
           --detect-shared-borders \
           --coalesce-fraction-as-needed \
           --coalesce-densest-as-needed \
           --coalesce-smallest-as-needed \
           --increase-gamma-as-needed \
           --coalesce \
           --reorder \
           --minimum-zoom=0 \
           --maximum-zoom=17 \
           --force \
           --simplification=20 \
           output/simplified_buildings.geojson

About

License:MIT License


Languages

Language:Python 52.6%Language:Astro 43.8%Language:JavaScript 3.6%