├── .gitignore ├── README.md ├── environment.yml └── lessons ├── lesson-1 ├── exercise-1.ipynb ├── fig │ ├── multipolygons_595x300px.svg │ └── simple-features_595x500px.svg └── geometry-objects.ipynb ├── lesson-2 ├── data │ ├── eu_countries │ │ ├── SOURCE │ │ ├── eu_countries_2022.gpkg │ │ └── eu_countries_EPSG3035.gpkg │ ├── europe_nuts_regions.geojson │ ├── finland_municipalities │ │ ├── SOURCE │ │ └── finland_municipalities_2021.gpkg │ ├── finland_topographic_database │ │ ├── SOURCE │ │ ├── area_by_terrain_class.csv │ │ ├── download-mml-data.py │ │ ├── h_L4132R_p.cpg │ │ ├── h_L4132R_p.dbf │ │ ├── h_L4132R_p.prj │ │ ├── h_L4132R_p.shp │ │ ├── h_L4132R_p.shx │ │ ├── h_L4132R_v.cpg │ │ ├── h_L4132R_v.dbf │ │ ├── h_L4132R_v.prj │ │ ├── h_L4132R_v.shp │ │ ├── h_L4132R_v.shx │ │ ├── j_L4132R_s.cpg │ │ ├── j_L4132R_s.dbf │ │ ├── j_L4132R_s.prj │ │ ├── j_L4132R_s.shp │ │ ├── j_L4132R_s.shx │ │ ├── j_L4132R_v.cpg │ │ ├── j_L4132R_v.dbf │ │ ├── j_L4132R_v.prj │ │ ├── j_L4132R_v.shp │ │ ├── j_L4132R_v.shx │ │ ├── k_L4132R_s.cpg │ │ ├── k_L4132R_s.dbf │ │ ├── k_L4132R_s.prj │ │ ├── k_L4132R_s.shp │ │ ├── k_L4132R_s.shx │ │ ├── k_L4132R_t.cpg │ │ ├── k_L4132R_t.dbf │ │ ├── k_L4132R_t.prj │ │ ├── k_L4132R_t.shp │ │ ├── k_L4132R_t.shx │ │ ├── l_L4132R_s.cpg │ │ ├── l_L4132R_s.dbf │ │ ├── l_L4132R_s.prj │ │ ├── l_L4132R_s.shp │ │ ├── l_L4132R_s.shx │ │ ├── l_L4132R_t.cpg │ │ ├── l_L4132R_t.dbf │ │ ├── l_L4132R_t.prj │ │ ├── l_L4132R_t.shp │ │ ├── l_L4132R_t.shx │ │ ├── lakes.cpg │ │ ├── lakes.dbf │ │ ├── lakes.prj │ │ ├── lakes.shp │ │ ├── lakes.shx │ │ ├── m_L4132R_p.cpg │ │ ├── m_L4132R_p.dbf │ │ ├── m_L4132R_p.prj │ │ ├── m_L4132R_p.shp │ │ ├── m_L4132R_p.shx │ │ ├── m_L4132R_s.cpg │ │ ├── m_L4132R_s.dbf │ │ ├── m_L4132R_s.prj │ │ ├── m_L4132R_s.shp │ │ ├── m_L4132R_s.shx │ │ ├── m_L4132R_t.cpg │ │ ├── m_L4132R_t.dbf │ │ ├── m_L4132R_t.prj │ │ ├── m_L4132R_t.shp │ │ ├── m_L4132R_t.shx │ │ ├── n_L4132R_p.cpg │ │ ├── n_L4132R_p.dbf │ │ ├── n_L4132R_p.prj │ │ ├── n_L4132R_p.shp │ │ ├── n_L4132R_p.shx │ │ ├── n_L4132R_s.cpg │ │ ├── n_L4132R_s.dbf │ │ ├── n_L4132R_s.prj │ │ ├── n_L4132R_s.shp │ │ ├── n_L4132R_s.shx │ │ ├── n_L4132R_t.cpg │ │ ├── n_L4132R_t.dbf │ │ ├── n_L4132R_t.prj │ │ ├── n_L4132R_t.shp │ │ ├── n_L4132R_t.shx │ │ ├── n_L4132R_v.cpg │ │ ├── n_L4132R_v.dbf │ │ ├── n_L4132R_v.prj │ │ ├── n_L4132R_v.shp │ │ ├── n_L4132R_v.shx │ │ ├── r_L4132R_s.cpg │ │ ├── r_L4132R_s.dbf │ │ ├── r_L4132R_s.prj │ │ ├── r_L4132R_s.shp │ │ ├── r_L4132R_s.shx │ │ ├── r_L4132R_t.cpg │ │ ├── r_L4132R_t.dbf │ │ ├── r_L4132R_t.prj │ │ ├── r_L4132R_t.shp │ │ ├── r_L4132R_t.shx │ │ ├── s_L4132R_p.cpg │ │ ├── s_L4132R_p.dbf │ │ ├── s_L4132R_p.prj │ │ ├── s_L4132R_p.shp │ │ ├── s_L4132R_p.shx │ │ ├── s_L4132R_s.cpg │ │ ├── s_L4132R_s.dbf │ │ ├── s_L4132R_s.prj │ │ ├── s_L4132R_s.shp │ │ ├── s_L4132R_s.shx │ │ ├── s_L4132R_t.cpg │ │ ├── s_L4132R_t.dbf │ │ ├── s_L4132R_t.prj │ │ ├── s_L4132R_t.shp │ │ ├── s_L4132R_t.shx │ │ ├── s_L4132R_v.cpg │ │ ├── s_L4132R_v.dbf │ │ ├── s_L4132R_v.prj │ │ ├── s_L4132R_v.shp │ │ ├── s_L4132R_v.shx │ │ ├── terrain_32111.cpg │ │ ├── terrain_32111.dbf │ │ ├── terrain_32111.prj │ │ ├── terrain_32111.shp │ │ ├── terrain_32111.shx │ │ ├── terrain_32112.cpg │ │ ├── terrain_32112.dbf │ │ ├── terrain_32112.prj │ │ ├── terrain_32112.shp │ │ ├── terrain_32112.shx │ │ ├── terrain_32200.cpg │ │ ├── terrain_32200.dbf │ │ ├── terrain_32200.prj │ │ ├── terrain_32200.shp │ │ ├── terrain_32200.shx │ │ ├── terrain_32417.cpg │ │ ├── terrain_32417.dbf │ │ ├── terrain_32417.prj │ │ ├── terrain_32417.shp │ │ ├── terrain_32417.shx │ │ ├── terrain_32421.cpg │ │ ├── terrain_32421.dbf │ │ ├── terrain_32421.prj │ │ ├── terrain_32421.shp │ │ ├── terrain_32421.shx │ │ ├── terrain_32500.cpg │ │ ├── terrain_32500.dbf │ │ ├── terrain_32500.prj │ │ ├── terrain_32500.shp │ │ ├── terrain_32500.shx │ │ ├── terrain_32611.cpg │ │ ├── terrain_32611.dbf │ │ ├── terrain_32611.prj │ │ ├── terrain_32611.shp │ │ ├── terrain_32611.shx │ │ ├── terrain_32612.cpg │ │ ├── terrain_32612.dbf │ │ ├── terrain_32612.prj │ │ ├── terrain_32612.shp │ │ ├── terrain_32612.shx │ │ ├── terrain_32800.cpg │ │ ├── terrain_32800.dbf │ │ ├── terrain_32800.prj │ │ ├── terrain_32800.shp │ │ ├── terrain_32800.shx │ │ ├── terrain_32900.cpg │ │ ├── terrain_32900.dbf │ │ ├── terrain_32900.prj │ │ ├── terrain_32900.shp │ │ ├── terrain_32900.shx │ │ ├── terrain_33000.cpg │ │ ├── terrain_33000.dbf │ │ ├── terrain_33000.prj │ │ ├── terrain_33000.shp │ │ ├── terrain_33000.shx │ │ ├── terrain_33100.cpg │ │ ├── terrain_33100.dbf │ │ ├── terrain_33100.prj │ │ ├── terrain_33100.shp │ │ ├── terrain_33100.shx │ │ ├── terrain_34100.cpg │ │ ├── terrain_34100.dbf │ │ ├── terrain_34100.prj │ │ ├── terrain_34100.shp │ │ ├── terrain_34100.shx │ │ ├── terrain_34300.cpg │ │ ├── terrain_34300.dbf │ │ ├── terrain_34300.prj │ │ ├── terrain_34300.shp │ │ ├── terrain_34300.shx │ │ ├── terrain_34700.cpg │ │ ├── terrain_34700.dbf │ │ ├── terrain_34700.prj │ │ ├── terrain_34700.shp │ │ ├── terrain_34700.shx │ │ ├── terrain_35300.cpg │ │ ├── terrain_35300.dbf │ │ ├── terrain_35300.prj │ │ ├── terrain_35300.shp │ │ ├── terrain_35300.shx │ │ ├── terrain_35411.cpg │ │ ├── terrain_35411.dbf │ │ ├── terrain_35411.prj │ │ ├── terrain_35411.shp │ │ ├── terrain_35411.shx │ │ ├── terrain_35412.cpg │ │ ├── terrain_35412.dbf │ │ ├── terrain_35412.prj │ │ ├── terrain_35412.shp │ │ ├── terrain_35412.shx │ │ ├── terrain_35421.cpg │ │ ├── terrain_35421.dbf │ │ ├── terrain_35421.prj │ │ ├── terrain_35421.shp │ │ ├── terrain_35421.shx │ │ ├── terrain_36200.cpg │ │ ├── terrain_36200.dbf │ │ ├── terrain_36200.prj │ │ ├── terrain_36200.shp │ │ ├── terrain_36200.shx │ │ ├── terrain_36313.cpg │ │ ├── terrain_36313.dbf │ │ ├── terrain_36313.prj │ │ ├── terrain_36313.shp │ │ ├── terrain_36313.shx │ │ ├── u_L4132R_p.cpg │ │ ├── u_L4132R_p.dbf │ │ ├── u_L4132R_p.prj │ │ ├── u_L4132R_p.shp │ │ ├── u_L4132R_p.shx │ │ ├── u_L4132R_v.cpg │ │ ├── u_L4132R_v.dbf │ │ ├── u_L4132R_v.prj │ │ ├── u_L4132R_v.shp │ │ └── u_L4132R_v.shx │ └── world_countries │ │ ├── SOURCE │ │ └── ne_110m_admin_0_countries.zip ├── figs │ └── paituli-download_700x650px.png ├── geopandas-an-introduction.ipynb ├── managing-file-paths.ipynb ├── map-projections.ipynb └── vector-data-io.ipynb ├── lesson-3 ├── data │ ├── helsinki_addresses │ │ └── addresses.txt │ └── helsinki_city_districts │ │ ├── SOURCE │ │ └── helsinki_city_districts_2021.gpkg ├── geocoding-in-geopandas.ipynb ├── intersect.ipynb ├── point-in-polygon-queries.ipynb └── spatial-join.ipynb ├── lesson-4 ├── data │ ├── amazon_river │ │ └── amazon_river.gpkg │ ├── helsinki_municipality │ │ └── helsinki_municipality.gpkg │ └── helsinki_region_travel_times_to_railway_station │ │ └── helsinki_region_travel_times_to_railway_station.gpkg ├── images │ └── overlay-operations_700x200px.svg ├── overlay-analysis.ipynb ├── reclassifying-data.ipynb ├── simplifying-geometries.ipynb └── vector-data-aggregating.ipynb ├── lesson-5 ├── data │ ├── addresses.gpkg │ └── helsinki_region_travel_times_to_railway_station │ │ └── helsinki_region_travel_times_to_railway_station.gpkg ├── interactive-maps.ipynb └── static-maps.ipynb ├── lesson-6 ├── data │ └── .keep ├── images │ └── osm-logo_256x256px.svg ├── network-analysis.ipynb └── retrieve-data-from-openstreetmap.ipynb └── lesson-7 ├── Raster-explore.ipynb ├── Raster-processing.ipynb ├── data ├── L4133A.tif ├── L4133B.tif ├── L4133C.tif ├── L4133D.tif ├── U4234A.tif └── sentinel2_Nuuksio_small.tif ├── exercise-6.ipynb ├── fig ├── raster_rep.png └── yllas.jpg ├── overview.ipynb └── raster-part1.rst /.gitignore: -------------------------------------------------------------------------------- 1 | .nbgrader.log 2 | .ipynb_checkpoints 3 | 4 | lessons/lesson-6/cache 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Automating GIS processes: notebooks used during the lessons at the University of Helsinki 2 | 3 | This repository contains the notebooks used in contact-teaching. The [docker image used for CSC 4 | Notebooks](https://github.com/Automating-GIS-processes/csc-notebook-dockerfile) 5 | clones (or fetches and merges) this repository upon start. 6 | 7 | To prepare these files, use `jupytext` to convert the markdown-based notebooks from 8 | [Automating-GIS-processes/site](https://github.com/Automating-GIS-processes/site), 9 | then remove the code from cells that should be filled during the lesson. 10 | 11 | If you want to add the lessons one-by-one as the course proceeds (e.g., every 12 | week), you can clone this repository locally in the beginning of the teaching 13 | period, run `git rm --cached -r lesson-?` to remove all lessons from the index (but 14 | keep a local copy), commit and push. Each week, you can then use `git add lesson-1`, 15 | commit and push, to upload the new content. 16 | 17 | **At the beginning of the teaching period**, remember to replace `environment.yml` with an 18 | updated listing all packages pinned to the current year’s versions (see the [README in 19 | `Automating-GIS-processes/site`](https://github.com/Automating-GIS-processes/site/blob/main/README.md)). 20 | -------------------------------------------------------------------------------- /environment.yml: -------------------------------------------------------------------------------- 1 | name: autogis 2 | channels: 3 | - conda-forge 4 | - defaults 5 | dependencies: 6 | - _libgcc_mutex=0.1 7 | - _openmp_mutex=4.5 8 | - affine=2.3.1 9 | - alabaster=0.7.12 10 | - alsa-lib=1.2.7.2 11 | - anyio=3.6.2 12 | - argon2-cffi=21.3.0 13 | - argon2-cffi-bindings=21.2.0 14 | - asttokens=2.0.8 15 | - attr=2.5.1 16 | - attrs=22.1.0 17 | - babel=2.10.3 18 | - backcall=0.2.0 19 | - backports=1.0 20 | - backports.functools_lru_cache=1.6.4 21 | - beautifulsoup4=4.11.1 22 | - bleach=5.0.1 23 | - blosc=1.21.1 24 | - bokeh=2.4.3 25 | - boost-cpp=1.78.0 26 | - branca=0.5.0 27 | - brotli=1.0.9 28 | - brotli-bin=1.0.9 29 | - brotlipy=0.7.0 30 | - bzip2=1.0.8 31 | - c-ares=1.18.1 32 | - ca-certificates=2022.9.24 33 | - cairo=1.16.0 34 | - certifi=2022.9.24 35 | - cffi=1.15.1 36 | - cfitsio=4.1.0 37 | - charset-normalizer=2.1.1 38 | - click=8.1.3 39 | - click-plugins=1.1.1 40 | - cligj=0.7.2 41 | - colorama=0.4.6 42 | - contextily=1.2.0 43 | - contourpy=1.0.5 44 | - cryptography=38.0.2 45 | - curl=7.86.0 46 | - cycler=0.11.0 47 | - cykhash=2.0.0 48 | - cython=0.29.32 49 | - dbus=1.13.6 50 | - debugpy=1.6.3 51 | - decorator=5.1.1 52 | - defusedxml=0.7.1 53 | - docutils=0.17.1 54 | - entrypoints=0.4 55 | - executing=1.1.1 56 | - expat=2.5.0 57 | - fftw=3.3.10 58 | - fiona=1.8.22 59 | - flit-core=3.7.1 60 | - folium=0.13.0 61 | - font-ttf-dejavu-sans-mono=2.37 62 | - font-ttf-inconsolata=3.000 63 | - font-ttf-source-code-pro=2.038 64 | - font-ttf-ubuntu=0.83 65 | - fontconfig=2.14.1 66 | - fonts-conda-ecosystem=1 67 | - fonts-conda-forge=1 68 | - fonttools=4.38.0 69 | - freetype=2.12.1 70 | - freexl=1.0.6 71 | - gdal=3.5.2 72 | - geographiclib=1.52 73 | - geojson=2.5.0 74 | - geopandas=0.12.0 75 | - geopandas-base=0.12.0 76 | - geopy=2.2.0 77 | - geos=3.11.0 78 | - geotiff=1.7.1 79 | - gettext=0.21.1 80 | - giflib=5.2.1 81 | - gitdb=4.0.9 82 | - gitpython=3.1.29 83 | - glib=2.74.1 84 | - glib-tools=2.74.1 85 | - greenlet=1.1.3.post0 86 | - gst-plugins-base=1.20.3 87 | - gstreamer=1.20.3 88 | - hdf4=4.2.15 89 | - hdf5=1.12.2 90 | - icu=70.1 91 | - idna=3.4 92 | - imagesize=1.4.1 93 | - importlib-metadata=5.0.0 94 | - importlib_resources=5.10.0 95 | - ipykernel=6.16.2 96 | - ipython=8.6.0 97 | - ipython_genutils=0.2.0 98 | - jack=1.9.21 99 | - jedi=0.18.1 100 | - jinja2=3.1.2 101 | - joblib=1.2.0 102 | - jpeg=9e 103 | - json-c=0.16 104 | - json5=0.9.5 105 | - jsonschema=4.16.0 106 | - jupyter-cache=0.5.0 107 | - jupyter-server-mathjax=0.2.6 108 | - jupyter_client=7.4.4 109 | - jupyter_core=4.11.1 110 | - jupyter_server=1.21.0 111 | - jupyterlab=3.5.0 112 | - jupyterlab-git=0.39.3 113 | - jupyterlab-markup=1.0.1 114 | - jupyterlab-myst=0.1.6 115 | - jupyterlab_pygments=0.2.2 116 | - jupyterlab_server=2.16.1 117 | - jupytext=1.14.0 118 | - kealib=1.4.15 119 | - keyutils=1.6.1 120 | - kiwisolver=1.4.4 121 | - krb5=1.19.3 122 | - lame=3.100 123 | - lcms2=2.13.1 124 | - ld_impl_linux-64=2.39 125 | - lerc=4.0.0 126 | - libblas=3.9.0 127 | - libbrotlicommon=1.0.9 128 | - libbrotlidec=1.0.9 129 | - libbrotlienc=1.0.9 130 | - libcap=2.66 131 | - libcblas=3.9.0 132 | - libclang=14.0.6 133 | - libclang13=14.0.6 134 | - libcups=2.3.3 135 | - libcurl=7.86.0 136 | - libdap4=3.20.6 137 | - libdb=6.2.32 138 | - libdeflate=1.14 139 | - libedit=3.1.20191231 140 | - libev=4.33 141 | - libevent=2.1.10 142 | - libffi=3.4.2 143 | - libflac=1.4.2 144 | - libgcc-ng=12.2.0 145 | - libgdal=3.5.2 146 | - libgfortran-ng=12.2.0 147 | - libgfortran5=12.2.0 148 | - libglib=2.74.1 149 | - libgomp=12.2.0 150 | - libiconv=1.17 151 | - libkml=1.3.0 152 | - liblapack=3.9.0 153 | - libllvm14=14.0.6 154 | - libnetcdf=4.8.1 155 | - libnghttp2=1.47.0 156 | - libnsl=2.0.0 157 | - libogg=1.3.4 158 | - libopenblas=0.3.21 159 | - libopus=1.3.1 160 | - libpng=1.6.38 161 | - libpq=14.5 162 | - librttopo=1.1.0 163 | - libsndfile=1.1.0 164 | - libsodium=1.0.18 165 | - libspatialindex=1.9.3 166 | - libspatialite=5.0.1 167 | - libsqlite=3.39.4 168 | - libssh2=1.10.0 169 | - libstdcxx-ng=12.2.0 170 | - libtiff=4.4.0 171 | - libtool=2.4.6 172 | - libudev1=251 173 | - libuuid=2.32.1 174 | - libvorbis=1.3.7 175 | - libwebp-base=1.2.4 176 | - libxcb=1.13 177 | - libxkbcommon=1.0.3 178 | - libxml2=2.10.3 179 | - libzip=1.9.2 180 | - libzlib=1.2.13 181 | - lz4-c=1.9.3 182 | - mapclassify=2.4.3 183 | - markdown-it-py=2.1.0 184 | - markupsafe=2.1.1 185 | - matplotlib=3.6.1 186 | - matplotlib-base=3.6.1 187 | - matplotlib-inline=0.1.6 188 | - mdit-py-plugins=0.3.1 189 | - mdurl=0.1.0 190 | - mercantile=1.2.1 191 | - mistune=2.0.4 192 | - mpg123=1.30.2 193 | - munch=2.5.0 194 | - munkres=1.1.4 195 | - mysql-common=8.0.31 196 | - mysql-libs=8.0.31 197 | - myst-nb=0.17.1 198 | - myst-parser=0.18.1 199 | - nbclassic=0.4.7 200 | - nbclient=0.5.13 201 | - nbconvert=7.2.3 202 | - nbconvert-core=7.2.3 203 | - nbconvert-pandoc=7.2.3 204 | - nbdime=3.1.1 205 | - nbformat=5.7.0 206 | - ncurses=6.3 207 | - nest-asyncio=1.5.6 208 | - networkx=2.8.7 209 | - notebook=6.4.12 210 | - notebook-shim=0.2.0 211 | - nspr=4.32 212 | - nss=3.78 213 | - numpy=1.23.4 214 | - openjpeg=2.5.0 215 | - openssl=1.1.1q 216 | - osmnx=1.2.2 217 | - packaging=21.3 218 | - pandas=1.5.1 219 | - pandoc=2.19.2 220 | - pandocfilters=1.5.0 221 | - parso=0.8.3 222 | - pcre=8.45 223 | - pcre2=10.37 224 | - pexpect=4.8.0 225 | - pickleshare=0.7.5 226 | - pillow=9.2.0 227 | - pip=22.3 228 | - pixman=0.40.0 229 | - pkgutil-resolve-name=1.3.10 230 | - ply=3.11 231 | - poppler=22.10.0 232 | - poppler-data=0.4.11 233 | - postgresql=14.5 234 | - proj=9.1.0 235 | - prometheus_client=0.15.0 236 | - prompt-toolkit=3.0.31 237 | - psutil=5.9.3 238 | - psycopg2=2.9.3 239 | - pthread-stubs=0.4 240 | - ptyprocess=0.7.0 241 | - pulseaudio=14.0 242 | - pure_eval=0.2.2 243 | - pycparser=2.21 244 | - pydata-sphinx-theme=0.8.1 245 | - pygeos=0.13 246 | - pygments=2.13.0 247 | - pyopenssl=22.1.0 248 | - pyparsing=3.0.9 249 | - pyproj=3.4.0 250 | - pyqt=5.15.7 251 | - pyqt5-sip=12.11.0 252 | - pyrobuf=0.9.3 253 | - pyrosm=0.6.1 254 | - pyrsistent=0.18.1 255 | - pysocks=1.7.1 256 | - python=3.10.6 257 | - python-dateutil=2.8.2 258 | - python-fastjsonschema=2.16.2 259 | - python-rapidjson=1.9 260 | - python_abi=3.10 261 | - pytz=2022.5 262 | - pyyaml=6.0 263 | - pyzmq=24.0.1 264 | - qt-main=5.15.6 265 | - rasterio=1.3.3 266 | - readline=8.1.2 267 | - requests=2.28.1 268 | - rtree=1.0.1 269 | - scikit-learn=1.1.3 270 | - scipy=1.9.3 271 | - send2trash=1.8.0 272 | - setuptools=65.5.0 273 | - shapely=1.8.5 274 | - sip=6.7.3 275 | - six=1.16.0 276 | - smmap=3.0.5 277 | - snappy=1.1.9 278 | - sniffio=1.3.0 279 | - snowballstemmer=2.2.0 280 | - snuggs=1.4.7 281 | - soupsieve=2.3.2.post1 282 | - sphinx=4.5.0 283 | - sphinx-book-theme=0.3.3 284 | - sphinxcontrib-applehelp=1.0.2 285 | - sphinxcontrib-devhelp=1.0.2 286 | - sphinxcontrib-htmlhelp=2.0.0 287 | - sphinxcontrib-jsmath=1.0.1 288 | - sphinxcontrib-qthelp=1.0.3 289 | - sphinxcontrib-serializinghtml=1.1.5 290 | - sqlalchemy=1.4.42 291 | - sqlite=3.39.4 292 | - stack_data=0.5.1 293 | - tabulate=0.9.0 294 | - terminado=0.17.0 295 | - threadpoolctl=3.1.0 296 | - tiledb=2.11.3 297 | - tinycss2=1.2.1 298 | - tk=8.6.12 299 | - toml=0.10.2 300 | - tomli=2.0.1 301 | - tornado=6.2 302 | - traitlets=5.5.0 303 | - typing-extensions=4.4.0 304 | - typing_extensions=4.4.0 305 | - tzcode=2022e 306 | - tzdata=2022e 307 | - unicodedata2=14.0.0 308 | - urllib3=1.26.11 309 | - wcwidth=0.2.5 310 | - webencodings=0.5.1 311 | - websocket-client=1.4.1 312 | - wheel=0.37.1 313 | - xcb-util=0.4.0 314 | - xcb-util-image=0.4.0 315 | - xcb-util-keysyms=0.4.0 316 | - xcb-util-renderutil=0.3.9 317 | - xcb-util-wm=0.4.1 318 | - xerces-c=3.2.4 319 | - xorg-kbproto=1.0.7 320 | - xorg-libice=1.0.10 321 | - xorg-libsm=1.2.3 322 | - xorg-libx11=1.7.2 323 | - xorg-libxau=1.0.9 324 | - xorg-libxdmcp=1.1.3 325 | - xorg-libxext=1.3.4 326 | - xorg-libxrender=0.9.10 327 | - xorg-renderproto=0.11.1 328 | - xorg-xextproto=7.3.0 329 | - xorg-xproto=7.0.31 330 | - xyzservices=2022.9.0 331 | - xz=5.2.6 332 | - yaml=0.2.5 333 | - zeromq=4.3.4 334 | - zipp=3.10.0 335 | - zlib=1.2.13 336 | - zstd=1.5.2 337 | -------------------------------------------------------------------------------- /lessons/lesson-1/exercise-1.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "a50b8b56", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise 1\n", 9 | "\n", 10 | "> **Important:** \n", 11 | "> Please complete this exercise **end of day** on Thursday, 7 November, 2024 (the day before the next work session).\n", 12 | "\n", 13 | "> **Remember the pre-assignment!** \n", 14 | "> Please complete the pre-assignment survey no later than 31.10.2024 23:59. Link to survey: [pre-course survey](https://elomake.helsinki.fi/lomakkeet/131798/lomake.html). Otherwise you may not be graded. \n", 15 | "\n", 16 | "To start this assignment, [accept the GitHub classroom\n", 17 | "assignment](https://classroom.github.com/a/vGLGgKdW), and clone *your own*\n", 18 | "repository, e.g., in a [CSC\n", 19 | "Noppe](../../course-info/course-environment)\n", 20 | "instance. Make sure you commit and push all changes you make (you can\n", 21 | "revisit instructions on how to use `git` and the JupyterLab git-plugin\n", 22 | "on the [website of the Geo-Python\n", 23 | "course](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/git-basics.html).\n", 24 | "\n", 25 | "To preview the exercise without logging in, you can find the open course copy\n", 26 | "of the course’s GitHub repository at\n", 27 | "[github.com/Automating-GIS-processes-II-2024/Exercise-1](https://github.com/Automating-GIS-processes-II-2024/Exercise-1).\n", 28 | "Don’t attempt to commit changes to that repository, but rather work with your\n", 29 | "personal GitHub classroom copy (see above).\n", 30 | "\n", 31 | "> **Admonition: Exercises are done individually** \n", 32 | "> All the weekly exercises need to be done individually in this period. \n", 33 | "> So **NO pair programming** for exercises in this period.\n", 34 | "\n", 35 | "\n", 36 | "\n", 37 | "## Hints\n", 38 | "\n", 39 | "- [Geo-Python, lesson 4: Functions](https://geo-python-site.readthedocs.io/en/latest/notebooks/L4/functions.html)\n", 40 | "- [Geo-Python, lesson 6: Iterating dataframe rows](https://geo-python-site.readthedocs.io/en/latest/notebooks/L6/advanced-data-processing-with-pandas.html#iterating-over-rows)\n", 41 | "- [Geo-Python, lesson 6: Using assertions](https://geo-python-site.readthedocs.io/en/latest/notebooks/L6/gcp-5-assertions.html)\n", 42 | "\n", 43 | "- `assert` statements\n", 44 | "- Alternatives to `pandas.DataFrame.iterrows()`\n", 45 | "- Iterating over multiple lists simultaneously\n", 46 | "\n", 47 | "\n", 48 | "### `assert` statements\n", 49 | "\n", 50 | "*Assertions* are a language feature in Python that allows the programmer to\n", 51 | "[assert](https://en.wiktionary.org/wiki/assert), ensure, that a certain\n", 52 | "condition is met. They are a good way to check that variables are in a suitable\n", 53 | "range for further computation. For instance, if a function converts a\n", 54 | "temperature, it can test that its input value is not below absolute zero. In a\n", 55 | "way, `assert` statements work similar to an electrical fuse: if input current\n", 56 | "is higher than expected, the fuse blows to protect the appliance that comes\n", 57 | "after. If input values are outside an expected range, the `assert` statement\n", 58 | "fails with an error, and stops the program to protect the following code from\n", 59 | "being executed with wrong input.\n", 60 | "\n", 61 | "`assert` statements are often used in functions to ensure the input values are\n", 62 | "acceptable. Consider the following example:" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "id": "4eb2bae6", 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "def divide(dividend, divisor):\n", 73 | " \"\"\"Return the division of dividend by divisor.\"\"\"\n", 74 | " assert divisor != 0, \"Cannot divide by zero.\"\n", 75 | " return (dividend / divisor)\n" 76 | ] 77 | }, 78 | { 79 | "cell_type": "markdown", 80 | "id": "f5bd5bbc", 81 | "metadata": {}, 82 | "source": [ 83 | "### Alternatives to `pandas.DataFrame.iterrows()`\n", 84 | "\n", 85 | "It is entirely possible to solve *problem 3* using the `iterrows()` pattern you\n", 86 | "learnt in [lesson 6 of\n", 87 | "Geo-Python](https://geo-python-site.readthedocs.io/en/latest/notebooks/L6/advanced-data-processing-with-pandas.html#iterating-over-rows),\n", 88 | "and your code would look something like this:" 89 | ] 90 | }, 91 | { 92 | "cell_type": "code", 93 | "execution_count": null, 94 | "id": "3f73e802", 95 | "metadata": {}, 96 | "outputs": [], 97 | "source": [ 98 | "import pandas\n", 99 | "import shapely.geometry\n", 100 | "\n", 101 | "data = pandas.DataFrame({\"x\": [10, 20, 30], \"y\": [1, 3, 4]})\n", 102 | "\n", 103 | "# Option 1: iterate over DataFrame’s rows:\n", 104 | "\n", 105 | "for i, row in data.iterrows():\n", 106 | " point = shapely.geometry.Point(row[\"x\"], row[\"y\"])\n", 107 | " # ...\n" 108 | ] 109 | }, 110 | { 111 | "cell_type": "markdown", 112 | "id": "12ec454a", 113 | "metadata": {}, 114 | "source": [ 115 | "**However**, there are better, faster, more elegant solutions that also are shorter to write.\n", 116 | "Pandas’ `DataFrame`s have a method `apply()` that runs a user-defined function on each row or on each column (depending on the `axis` parameter, if `axis=1`, `apply()` works on rows).\n", 117 | "\n", 118 | "The outputs of running the function repeatly (in parallel, to be precise) are collected in a `pandas.GeoSeries` that is the return value of `apply()` and can be assigned to a new column or row (we’ll learn about that in the next lesson, for now let’s convert the data into a list).\n", 119 | "\n", 120 | "Let’s look at an easy example to illustrate how that works: We create a simple function that takes a row and multiplies its `x` and `y` values:" 121 | ] 122 | }, 123 | { 124 | "cell_type": "code", 125 | "execution_count": null, 126 | "id": "c4233363", 127 | "metadata": {}, 128 | "outputs": [], 129 | "source": [ 130 | "def multiply(row):\n", 131 | " \"\"\"Multiply a row’s x and y values.\"\"\"\n", 132 | " return (row[\"x\"] * row[\"y\"])\n", 133 | "\n", 134 | "product = data.apply(multiply, axis=1)\n", 135 | "# note how the function is not called here (no parentheses!),\n", 136 | "# but only passed as a reference\n", 137 | "\n", 138 | "product = list(product)\n", 139 | "product" 140 | ] 141 | }, 142 | { 143 | "cell_type": "markdown", 144 | "id": "b49ea250", 145 | "metadata": {}, 146 | "source": [ 147 | "#### Pandas’ `apply()` method\n", 148 | "\n", 149 | "Exactly the same can be done with the more complex example of creating a point geometry:" 150 | ] 151 | }, 152 | { 153 | "cell_type": "code", 154 | "execution_count": null, 155 | "id": "f8da45df", 156 | "metadata": {}, 157 | "outputs": [], 158 | "source": [ 159 | "# Option 2: Define a custom function, and apply this function to the data frame\n", 160 | "\n", 161 | "def create_point(row):\n", 162 | " \"\"\"Create a Point geometry from a row with x and y values.\"\"\"\n", 163 | " point = shapely.geometry.Point(row[\"x\"], row[\"y\"])\n", 164 | " return point\n", 165 | "\n", 166 | "point_series = data.apply(create_point, axis=1)\n" 167 | ] 168 | }, 169 | { 170 | "cell_type": "markdown", 171 | "id": "50117986", 172 | "metadata": {}, 173 | "source": [ 174 | "#### `Apply()`ing an anonymous *lambda function*\n", 175 | "\n", 176 | "Finally, for simple functions that fit into one single line, we can pass the\n", 177 | "function in so-called ‘lambda notation’. Lambda functions follow the syntax\n", 178 | "`lambda arguments: return-value`, i.e., the keyword `lambda` followed by one or\n", 179 | "more, comma-separated, argument names (input variables), a colon (`:`), and the\n", 180 | "return value statement (e.g., a calculation). A lambda function that accepts\n", 181 | "two arguments and returns their sum, would look like this: `lambda a, b: (a + b)`.\n", 182 | "\n", 183 | "Lambda functions can only be used where they are defined, but offer a handy\n", 184 | "short-cut to not need separate functions for simple expressions. They are very\n", 185 | "common in data science projects, but should not be over-used: as a\n", 186 | "rule-of-thumb, don’t use lambda functions if their code does not fit on one\n", 187 | "(short) line.\n", 188 | "\n", 189 | "\n", 190 | "> **Info: Lambda functions** \n", 191 | "> Read more about lambda functions in the official [Python documentation](https://docs.python.org/3/tutorial/controlflow.html#lambda-expressions).\n", 192 | "\n", 193 | "\n", 194 | "\n", 195 | "For the geo-spatial problem we discussed above, we can use a lambda function to\n", 196 | "create a point ‘on-the-fly’:" 197 | ] 198 | }, 199 | { 200 | "cell_type": "code", 201 | "execution_count": null, 202 | "id": "2b643ca8", 203 | "metadata": {}, 204 | "outputs": [], 205 | "source": [ 206 | "# Option 3: Apply a lambda function to the data frame\n", 207 | "\n", 208 | "point_series = data.apply(\n", 209 | " lambda row: shapely.geometry.Point(row[\"x\"], row[\"y\"]),\n", 210 | " axis=1\n", 211 | ")\n" 212 | ] 213 | }, 214 | { 215 | "cell_type": "markdown", 216 | "id": "e7b01fbb", 217 | "metadata": {}, 218 | "source": [ 219 | "### Iterating over multiple lists simultaneously\n", 220 | "\n", 221 | "The [built-in Python function `zip()`](https://docs.python.org/3/library/functions.html#zip)\n", 222 | "makes it easy to work with multiple lists at the same time. It combines two or\n", 223 | "more lists and iterates over them in parallel, returning one value of each list\n", 224 | "at a time. Consider the following example:" 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "execution_count": null, 230 | "id": "504869b3", 231 | "metadata": {}, 232 | "outputs": [], 233 | "source": [ 234 | "dog_names = [\"Blackie\", \"Musti\", \"Svarte\"]\n", 235 | "dog_ages = [4.5, 2, 15]\n", 236 | "\n", 237 | "# Iterate over the names and ages lists in parallel:\n", 238 | "for name, age in zip(dog_names, dog_ages):\n", 239 | " print(f\"{name} is {age} years old\")" 240 | ] 241 | }, 242 | { 243 | "cell_type": "markdown", 244 | "id": "768c9f51", 245 | "metadata": {}, 246 | "source": [ 247 | "> **Note: Variable names** \n", 248 | "> This example illustrates quite well why variable names should be chosen wisely: lists, for instance, almost always represent multiple values, so their names should be in plural (e.g., `dog_names`). In a loop, having more than one variable can become confusing quickly; refrain from using short names such as `i` or `j` for anything but a simple counter: use descriptive names such as `name` or `age` in the above example.\n", 249 | "\n", 250 | "---\n", 251 | "\n", 252 | "> **Caution:** \n", 253 | "> When iterating over lists of different lengths, `zip` would shorten all lists to the length of the shortest. By default, this happens **without warning or error message**, so be careful!\n" 254 | ] 255 | }, 256 | { 257 | "cell_type": "code", 258 | "execution_count": null, 259 | "id": "602599fa-2dae-4439-9a52-7cfbad4fd1c9", 260 | "metadata": {}, 261 | "outputs": [], 262 | "source": [] 263 | } 264 | ], 265 | "metadata": { 266 | "kernelspec": { 267 | "display_name": "Python 3 (ipykernel)", 268 | "language": "python", 269 | "name": "python3" 270 | }, 271 | "language_info": { 272 | "codemirror_mode": { 273 | "name": "ipython", 274 | "version": 3 275 | }, 276 | "file_extension": ".py", 277 | "mimetype": "text/x-python", 278 | "name": "python", 279 | "nbconvert_exporter": "python", 280 | "pygments_lexer": "ipython3", 281 | "version": "3.11.7" 282 | } 283 | }, 284 | "nbformat": 4, 285 | "nbformat_minor": 5 286 | } 287 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/eu_countries/SOURCE: -------------------------------------------------------------------------------- 1 | # Countries of the European Union, 2022 2 | 3 | Data (c) EuroGeographics and UN-FAO 4 | 5 | - downloaded from https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units- 6 | statistical-units/countries, 7 | - filtered to include only E.U. countries, and 8 | - clipped to a bounding box of [-12.5, 34, 35.5, 70] degrees 9 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/eu_countries/eu_countries_2022.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/eu_countries/eu_countries_2022.gpkg -------------------------------------------------------------------------------- /lessons/lesson-2/data/eu_countries/eu_countries_EPSG3035.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/eu_countries/eu_countries_EPSG3035.gpkg -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_municipalities/SOURCE: -------------------------------------------------------------------------------- 1 | # Municipalities of Finland, 2021 2 | 3 | Data (c) Maanmittauslaitos/National Land Survey of Finland 4 | Downloaded from http://urn.fi/urn:nbn:fi:att:dc71353c-8063-4c67-abc1-3193a130b990 5 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_municipalities/finland_municipalities_2021.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_municipalities/finland_municipalities_2021.gpkg -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/SOURCE: -------------------------------------------------------------------------------- 1 | # Topographic database of Finland, 2022 2 | 3 | (c) Maanmittauslaitos 4 | (Licensed under CC-BY-4.0) 5 | 6 | Downloaded from https://paituli.csc.fi/, and re-compressed using geopandas 7 | (see script `download-mml-data.py` in this directory) 8 | 9 | Data description: http://urn.fi/urn:nbn:fi:att:d32f46b8-17cb-4f78-8dad-d026179835dd 10 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/area_by_terrain_class.csv: -------------------------------------------------------------------------------- 1 | CLASS,area 2 | 32111,1833.7467855105149 3 | 32112,2148.1682085057346 4 | 32200,105736.82189193157 5 | 32417,102.66777949892219 6 | 32421,679279.6545039193 7 | 32500,109746.68783052999 8 | 32611,13148071.439269768 9 | 32612,107343.07797553702 10 | 32800,1407230.9490656988 11 | 32900,615839.1249592721 12 | 33000,659464.6758634493 13 | 33100,3769075.6667607124 14 | 34100,12362888.100333406 15 | 34300,1627.0788294986928 16 | 34700,2785.7511990005496 17 | 35300,1382939.657899599 18 | 35411,392800.40747867135 19 | 35412,4708320.67303053 20 | 35421,67863.74341145632 21 | 36200,9986966.295089 22 | 36313,43460.28908141164 23 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/download-mml-data.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | """Download one topographic database grid cell from Maanmittauslaitos""" 4 | 5 | import io 6 | import pathlib 7 | import zipfile 8 | 9 | import requests 10 | 11 | 12 | TOPOGRAPHIC_DATABASE_DOWNLOAD_URL = ( 13 | "http://www.nic.funet.fi/" 14 | "index/geodata/mml/maastotietokanta/" 15 | "2020/shp/L4/L41/L4132R.shp.zip" 16 | ) 17 | TOPOGRAPHIC_DATABASE_DIRECTORY = pathlib.Path().resolve() 18 | 19 | with requests.get(TOPOGRAPHIC_DATABASE_DOWNLOAD_URL) as response: 20 | zipfile.ZipFile( 21 | io.BytesIO(response.content) 22 | ).extractall(TOPOGRAPHIC_DATABASE_DIRECTORY) 23 | 24 | # Remove a few of the largest files (not used in the course) 25 | large_files = [ 26 | "r_L4132R_v.*", 27 | "r_L4132R_p.*", 28 | "l_L4132R_v.*", 29 | "m_L4132R_v.*", 30 | "k_L4132R_v.*", 31 | ] 32 | for file in TOPOGRAPHIC_DATABASE_DIRECTORY.iterdir(): 33 | for large_file_pattern in large_files: 34 | if file.match(large_file_pattern): 35 | file.unlink() 36 | break 37 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_p.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/h_L4132R_v.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/j_L4132R_v.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/k_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/l_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/lakes.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/lakes.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/lakes.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/lakes.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/lakes.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/lakes.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/lakes.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/lakes.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_p.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/m_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_p.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/n_L4132R_v.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/r_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_p.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_s.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_t.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/s_L4132R_v.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32111.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32111.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32111.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32111.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32111.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32111.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32111.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32111.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32112.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32112.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32112.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32112.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32112.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32112.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32112.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32112.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32200.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32200.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32200.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32200.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32200.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32200.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32200.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32200.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32417.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32417.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32417.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32417.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32417.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32417.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32417.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32417.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32421.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32421.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32421.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32421.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32421.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32421.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32421.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32421.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32500.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32500.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32500.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32500.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32500.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32500.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32500.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32500.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32611.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32611.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32611.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32611.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32611.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32611.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32611.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32611.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32612.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32612.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32612.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32612.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32612.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32612.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32612.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32612.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32800.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32800.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32800.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32800.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32800.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32800.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32800.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32800.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32900.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32900.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32900.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32900.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32900.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32900.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_32900.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_32900.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33000.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33000.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33000.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33000.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33000.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33000.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33000.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33000.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33100.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33100.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33100.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33100.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33100.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33100.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_33100.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_33100.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34100.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34100.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34100.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34100.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34100.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34100.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34100.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34100.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34300.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34300.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34300.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34300.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34300.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34300.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34300.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34300.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34700.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34700.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34700.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34700.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34700.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34700.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_34700.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_34700.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35300.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35300.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35300.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35300.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35300.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35300.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35300.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35300.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35411.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35411.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35411.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35411.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35411.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35411.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35411.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35411.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35412.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35412.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35412.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35412.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35412.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35412.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35412.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35412.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35421.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35421.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35421.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35421.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35421.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35421.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_35421.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_35421.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36200.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36200.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36200.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36200.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36200.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36200.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36200.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36200.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36313.cpg: -------------------------------------------------------------------------------- 1 | ISO-8859-1 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36313.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36313.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36313.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_European_Terrestrial_Reference_System_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137.0,298.257222100911]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",27.0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36313.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36313.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/terrain_36313.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/terrain_36313.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_p.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.cpg: -------------------------------------------------------------------------------- 1 | UTF-8 -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.dbf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.dbf -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.prj: -------------------------------------------------------------------------------- 1 | PROJCS["ETRF89_ETRS_TM35FIN",GEOGCS["GCS_ETRS89",DATUM["D_ETRS_1989",SPHEROID["Geodetic_Reference_System_of_1980",6378137,298.2572221009113]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",27],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]] -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.shp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.shp -------------------------------------------------------------------------------- /lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.shx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/finland_topographic_database/u_L4132R_v.shx -------------------------------------------------------------------------------- /lessons/lesson-2/data/world_countries/SOURCE: -------------------------------------------------------------------------------- 1 | # Countries of the world (admin-0), 2022 2 | 3 | Downloaded from naturalearthdata.com 4 | -------------------------------------------------------------------------------- /lessons/lesson-2/data/world_countries/ne_110m_admin_0_countries.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/data/world_countries/ne_110m_admin_0_countries.zip -------------------------------------------------------------------------------- /lessons/lesson-2/figs/paituli-download_700x650px.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-2/figs/paituli-download_700x650px.png -------------------------------------------------------------------------------- /lessons/lesson-2/managing-file-paths.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "9102e9f0", 6 | "metadata": {}, 7 | "source": [ 8 | "# Managing file paths\n", 9 | "\n", 10 | "When working with data, it is important to keep track of where which input\n", 11 | "files are stored, and where which output files should be written. This is\n", 12 | "especially important when moving between computers or between virtual machines,\n", 13 | "like, for instance, the CSC Notebooks platform. Using a distributed code\n", 14 | "repository or versioning system, such as GitHub, adds another layer of\n", 15 | "complexity: file paths should often be *relative* to the git repo, or to the\n", 16 | "current file, as the repository can be cloned to any location on a different\n", 17 | "computer (and already a different user name on your school and personal\n", 18 | "computers might break things).\n", 19 | "\n", 20 | "Earlier, file paths have often been hard-coded strings, text values. If, for\n", 21 | "instance, an output file name had to be derived from an input file name, all\n", 22 | "kind of slicing and other string manipulation methods would be used. More\n", 23 | "recently, the `os.path` module of Python became popular, that allowed to split\n", 24 | "a path into directories, and file names into base names and file extensions.\n", 25 | "However, manipulating file paths still required knowledge about the computer a\n", 26 | "script would ultimately run on. For instance, on all Unix-based operating\n", 27 | "systems, such as Linux or MacOS, directories are separated by forward-slashes\n", 28 | "(`/`), while Microsoft Windows uses back-slashes (`\\`) (this particular problem\n", 29 | "can be worked around with `os.sep` and `os.path.join`, but not in a very\n", 30 | "convenient way). \n", 31 | "\n", 32 | "Since Python 3.4 (so, fairly recently), there exists a built-in module that\n", 33 | "eases much of the hassle with managing file paths:\n", 34 | "[`pathlib`](https://docs.python.org/3/library/pathlib.html). It provides an\n", 35 | "abstract layer on top of the actual operating system file paths that is\n", 36 | "consistent across computers. A `pathlib.Path()` object can be initiated with a\n", 37 | "file path (as a `str`), when created without an argument, it refers to the\n", 38 | "directory of the script or notebook file." 39 | ] 40 | }, 41 | { 42 | "cell_type": "code", 43 | "execution_count": null, 44 | "id": "12679a68", 45 | "metadata": {}, 46 | "outputs": [], 47 | "source": [] 48 | }, 49 | { 50 | "cell_type": "markdown", 51 | "id": "a2b8ddad", 52 | "metadata": {}, 53 | "source": [ 54 | "So far, this path is not checked against the actual directory structure, but we\n", 55 | "can `resolve()` it to convert it into an absolute path:" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": null, 61 | "id": "e0b5d88c", 62 | "metadata": {}, 63 | "outputs": [], 64 | "source": [] 65 | }, 66 | { 67 | "cell_type": "markdown", 68 | "id": "e56c6955", 69 | "metadata": {}, 70 | "source": [ 71 | "> **Note** \n", 72 | "> This path has now been expanded to reflect the directory structure of the computer it was run on. Most likely, the copy you are reading right now has been generated on [readthedocs.io](https://readthedocs.io/) servers, and the *‘current working directory’* is in a location you would not have expected.\n", 73 | "\n", 74 | "\n", 75 | "\n", 76 | "This path object now has a number of properties and methods. For instance, we\n", 77 | "can test whether the path exists in the file system, or whether it is a\n", 78 | "directory:" 79 | ] 80 | }, 81 | { 82 | "cell_type": "code", 83 | "execution_count": null, 84 | "id": "073bd87c", 85 | "metadata": {}, 86 | "outputs": [], 87 | "source": [] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": null, 92 | "id": "44e7e3af", 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [] 96 | }, 97 | { 98 | "cell_type": "markdown", 99 | "id": "3e813b3e", 100 | "metadata": {}, 101 | "source": [ 102 | "We could also rename or delete the path (but let’s not do this with the course\n", 103 | "content!):" 104 | ] 105 | }, 106 | { 107 | "cell_type": "code", 108 | "execution_count": null, 109 | "id": "d223d6da", 110 | "metadata": {}, 111 | "outputs": [], 112 | "source": [ 113 | "# path.rename(\"new name\")\n", 114 | "\n", 115 | "# path.unlink() # delete if path is a file\n", 116 | "# path.rmdir() # delete if path is a directory" 117 | ] 118 | }, 119 | { 120 | "cell_type": "markdown", 121 | "id": "045a5017", 122 | "metadata": {}, 123 | "source": [ 124 | "Finally, to traverse within this path, you don’t have to think of whether you\n", 125 | "are running the script on Windows or Linux, and you most definitely don’t have\n", 126 | "to use string manipulation. To refer to a directory inside `path`, use the `/`\n", 127 | "(division operator) to append another path component (can be a string). For\n", 128 | "instance, to refer to a folder `data` within the same directory as this\n", 129 | "notebook, write the following:" 130 | ] 131 | }, 132 | { 133 | "cell_type": "code", 134 | "execution_count": null, 135 | "id": "ba3c0108", 136 | "metadata": {}, 137 | "outputs": [], 138 | "source": [] 139 | }, 140 | { 141 | "cell_type": "markdown", 142 | "id": "af63766a", 143 | "metadata": {}, 144 | "source": [ 145 | "To refer to ‘one directory up’ from a path, use its `.parent` property:" 146 | ] 147 | }, 148 | { 149 | "cell_type": "code", 150 | "execution_count": null, 151 | "id": "445b21d0", 152 | "metadata": {}, 153 | "outputs": [], 154 | "source": [ 155 | "path.parent" 156 | ] 157 | }, 158 | { 159 | "cell_type": "markdown", 160 | "id": "47f3ddba", 161 | "metadata": {}, 162 | "source": [ 163 | "`Path()` objects can be used (almost) anywhere a file path is expected as a\n", 164 | "variable of type `str`, as it automatically *typecasts* (converts) itself to a\n", 165 | "suitable type.\n", 166 | "\n", 167 | "In data science projects, it is a good habit to define a constant at the beginning of each notebook that points to the data directory, or multiple constants to point to, for instance, input and output directories. In today’s exercises we use different sample data sets from files stored in the same *data directory*. At the top of the notebooks, we thus define a constant `DATA_DIRECTORY` that we can later use to find the sample data set files:" 168 | ] 169 | }, 170 | { 171 | "cell_type": "code", 172 | "execution_count": null, 173 | "id": "54d9c129", 174 | "metadata": {}, 175 | "outputs": [], 176 | "source": [ 177 | "# location (directory) of the notebook\n", 178 | "import pathlib\n", 179 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 180 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 181 | ] 182 | }, 183 | { 184 | "cell_type": "code", 185 | "execution_count": null, 186 | "id": "f6837c51", 187 | "metadata": {}, 188 | "outputs": [], 189 | "source": [ 190 | "# this can then be used, for instance, in `geopandas.read_file()` (see next section):\n", 191 | "import geopandas\n", 192 | "data_set = geopandas.read_file(DATA_DIRECTORY / \"finland_municipalities\" / \"finland_municipalities_2021.gpkg\")\n", 193 | "data_set.plot()" 194 | ] 195 | }, 196 | { 197 | "cell_type": "markdown", 198 | "id": "7eb5e1f8", 199 | "metadata": {}, 200 | "source": [ 201 | "> **Note** \n", 202 | "> **Constants** are values that cannot be modified once they have been defined. This helps optimize programs’ speed and memory footprint, and also allows the programmer to rely on a constant having a valid value.\n", 203 | "> \n", 204 | "> Python does not know the concept of a constant, per se. However, there is a convention to treat variables with an all-uppercase name as constants (e.g., they should not be modified).\n", 205 | "\n", 206 | "---\n", 207 | "\n", 208 | "> **Caution** \n", 209 | "> In the examples above, we used a path that we `resolve()`d earlier on. This further improves compatibility and consistency across operating systems and local installations.\n", 210 | "> \n", 211 | "> Especially when using the path of the current file (as in `pathlib.Path()` without parameters), we recommend resolving the path before traversing into any other directory.\n" 212 | ] 213 | }, 214 | { 215 | "cell_type": "code", 216 | "execution_count": null, 217 | "id": "8a4ef056-fb8f-4636-ba5b-aa0f392f60ee", 218 | "metadata": {}, 219 | "outputs": [], 220 | "source": [] 221 | } 222 | ], 223 | "metadata": { 224 | "kernelspec": { 225 | "display_name": "Python 3 (ipykernel)", 226 | "language": "python", 227 | "name": "python3" 228 | }, 229 | "language_info": { 230 | "codemirror_mode": { 231 | "name": "ipython", 232 | "version": 3 233 | }, 234 | "file_extension": ".py", 235 | "mimetype": "text/x-python", 236 | "name": "python", 237 | "nbconvert_exporter": "python", 238 | "pygments_lexer": "ipython3", 239 | "version": "3.11.7" 240 | } 241 | }, 242 | "nbformat": 4, 243 | "nbformat_minor": 5 244 | } 245 | -------------------------------------------------------------------------------- /lessons/lesson-2/vector-data-io.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "d2c25fc6", 6 | "metadata": {}, 7 | "source": [ 8 | "# Vector Data I/O\n", 9 | "\n", 10 | "One of the first steps of many analysis workflow is to read data from a file,\n", 11 | "one of the last steps often writes data to an output file. To the horror of\n", 12 | "many geoinformatics scholars, there exist many file formats for GIS data: the\n", 13 | "old and hated but also loved and established [ESRI\n", 14 | "Shapefile](https://en.wikipedia.org/wiki/Shapefile), the universal [Geopackage\n", 15 | "(GPKG)](https://en.wikipedia.org/wiki/GeoPackage), and the web-optimised\n", 16 | "[GeoJSON](https://en.wikipedia.org/wiki/GeoJSON) are just a few of the more\n", 17 | "well-known examples.\n", 18 | "\n", 19 | "Fear not, Python can read them all (no guarantees, though)! \n", 20 | "\n", 21 | "Most of the current Python GIS packages rely on the\n", 22 | "[GDAL/OGR](https://gdal.org/) libraries, for which modern interfaces exist in\n", 23 | "the form of the [fiona](https://fiona.readthedocs.io) and\n", 24 | "[rasterio](https://rasterio.readthedocs.io) Python packages. \n", 25 | "\n", 26 | "Today, we’ll concentrate on vector data, so let’s first take a closer look at\n", 27 | "fiona’s capabilities, and then import and export data using\n", 28 | "[geopandas](https://geopandas.org/), which uses fiona under its hood.\n", 29 | "\n", 30 | "\n", 31 | "---\n", 32 | "\n", 33 | "\n", 34 | "> **Note: Defining a data directory constant** \n", 35 | "> To make it easier to manage the paths of input and output data files, it is a good habit to [define a constant pointing to the data directory](managing-file-paths) at the top of a notebook.\n" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": null, 41 | "id": "a46f5964", 42 | "metadata": {}, 43 | "outputs": [], 44 | "source": [ 45 | "import pathlib \n", 46 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 47 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "id": "59de17d9", 53 | "metadata": {}, 54 | "source": [ 55 | "---\n", 56 | "\n", 57 | "\n", 58 | "## File formats\n", 59 | "\n", 60 | "Fiona can read (almost) any geospatial file format, and write many of them. To\n", 61 | "find out which ones exactly (it might depend on the local installation and\n", 62 | "version, as well), we can print its list of file format drivers:" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "id": "79c962de", 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "import fiona\n", 73 | "fiona.supported_drivers" 74 | ] 75 | }, 76 | { 77 | "cell_type": "markdown", 78 | "id": "fc98f8aa", 79 | "metadata": {}, 80 | "source": [ 81 | "> **Hint** \n", 82 | "> In this list, `r` marks file formats fiona can *r*ead, and `w` formats it can *w*rite. An `a` marks formats for which fiona can *a*ppend new data to existing files.\n", 83 | "> \n", 84 | "> Note that each of the listed ‘formats’ is, in fact, the name of the driver implementation, and many of the drivers can open several related file formats.\n", 85 | "> \n", 86 | "> Many more ‘exotic’ file formats might not show up in this list on your local installation, because you would need to install additional libraries. You can find a full list of file formats supported by GDAL/OGR (and fiona) on its webpage: [gdal.org/drivers/vector/](https://gdal.org/drivers/vector/).\n", 87 | "\n", 88 | "\n", 89 | "\n", 90 | "### Reading and writing geospatial data\n", 91 | "\n", 92 | "Fiona allows very low-level access to geodata files. This is sometimes\n", 93 | "necessary, but in typical analysis workflows, it is more convenient to use a\n", 94 | "higher-level library. The most commonly used one for geospatial vector data is\n", 95 | "[geopandas](https://geopandas.org). As mentioned above, it uses fiona for\n", 96 | "reading and writing files, and thus supports the same file formats.\n", 97 | "\n", 98 | "To read data from a *GeoPackage* file into a `geopandas.GeoDataFrame` (a\n", 99 | "geospatially-enabled version of a `pandas.DataFrame`), use\n", 100 | "`geopandas.read_file()`:" 101 | ] 102 | }, 103 | { 104 | "cell_type": "code", 105 | "execution_count": null, 106 | "id": "1e0e97a3", 107 | "metadata": {}, 108 | "outputs": [], 109 | "source": [] 110 | }, 111 | { 112 | "cell_type": "markdown", 113 | "id": "5262fa5f", 114 | "metadata": {}, 115 | "source": [ 116 | "Reading a local GPKG file is most likely the easiest task for a GIS package.\n", 117 | "However, in perfect Python ‘Swiss pocket knife’ manner, geopandas can also read\n", 118 | "Shapefiles **inside a ZIP archive**, and/or straight **from an Internet URL**.\n", 119 | "For example, downloading, unpacking and opening a data set of NUTS regions from\n", 120 | "the [European Union’s GISCO/eurostat download\n", 121 | "page](https://ec.europa.eu/eurostat/web/gisco/geodata/reference-data/administrative-units-statistical-units/nuts)\n", 122 | "is one line of code:\n", 123 | "\n", 124 | "```{code}\n", 125 | "nuts_regions = geopandas.read_file(\"https://gisco-services.ec.europa.eu/distribution/v2/nuts/shp/NUTS_RG_60M_2021_3035.shp.zip\")\n", 126 | "nuts_regions.head()\n", 127 | "```" 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": null, 133 | "id": "49583e11", 134 | "metadata": { 135 | "tags": [ 136 | "remove-input", 137 | "remove-output" 138 | ] 139 | }, 140 | "outputs": [], 141 | "source": [ 142 | "nuts_regions = geopandas.read_file(DATA_DIRECTORY / \"europe_nuts_regions.geojson\")\n", 143 | "nuts_regions.head()" 144 | ] 145 | }, 146 | { 147 | "cell_type": "markdown", 148 | "id": "af08516e", 149 | "metadata": {}, 150 | "source": [ 151 | "#### Writing geospatial data to a file\n", 152 | "\n", 153 | "Writing data to a file is equally straight-forward: simply use the [`to_file()`\n", 154 | "method](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_file.html#geopandas.GeoDataFrame.to_file)\n", 155 | "of a `GeoDataFrame`.\n", 156 | "\n", 157 | "If we want to keep a local copy of the NUTS region data set we just opened\n", 158 | "on-the-fly from an internet address, the following saves the data to a GeoJSON\n", 159 | "file (the file format is guessed from the file name):" 160 | ] 161 | }, 162 | { 163 | "cell_type": "code", 164 | "execution_count": null, 165 | "id": "6f3d2b9a", 166 | "metadata": {}, 167 | "outputs": [], 168 | "source": [] 169 | }, 170 | { 171 | "cell_type": "markdown", 172 | "id": "1af93aae", 173 | "metadata": {}, 174 | "source": [ 175 | "> **Note** \n", 176 | "> Reading and writing geospatial data from or to a file is almost identical for all file formats supported by geopandas, fiona, and GDAL. Check out [geopandas’ documentation](https://geopandas.org/en/stable/docs/user_guide/io.html) for hints on how to fine-tune reading or writing a file, and how to apply different filters (e.g., bounding boxes).\n", 177 | "\n", 178 | "\n", 179 | "\n", 180 | "### Reading and writing from and to databases (RDBMS)\n", 181 | "\n", 182 | "Geopandas has native support for read/write access to PostgreSQL/PostGIS\n", 183 | "databases, using its\n", 184 | "[`geopandas.read_postgis()`](https://geopandas.org/en/stable/docs/reference/api/geopandas.read_postgis.html) function and the\n", 185 | "[`GeoDataFrame.to_postgis()`](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.to_postgis.html)\n", 186 | "method. For the database connection, you can use, for instance, the\n", 187 | "`sqlalchemy` package.\n", 188 | "\n", 189 | "```{code}\n", 190 | "import sqlalchemy\n", 191 | "DB_CONNECTION_URL = \"postgresql://myusername:mypassword@myhost:5432/mydatabase\";\n", 192 | "db_engine = sqlalchemy.create_engine(DB_CONNECTION_URL)\n", 193 | "\n", 194 | "countries = geopandas.read_postgis(\n", 195 | " \"SELECT name, geometry FROM countries\",\n", 196 | " db_engine\n", 197 | ")\n", 198 | "countries.to_postgis(\n", 199 | " \"new_table\", \n", 200 | " db_engine\n", 201 | ")\n", 202 | "```\n", 203 | "\n", 204 | "\n", 205 | "### Reading data directly from a WFS (Web feature service) endpoint\n", 206 | "\n", 207 | "Geopandas can also read data directly from a WFS endpoint, such as, for instance the geodata APIs of [Helsinki Region Infoshare](https://hri.fi). Constructing a valid WFS URI (address) is not part of this course (but check, for instance, the properties of a layer added to QGIS).\n", 208 | "\n", 209 | "The following code loads a population grid of Helsinki from 2022. The parameters encoded into the WFS address specify the layer name, a bounding box, and the requested reference system." 210 | ] 211 | }, 212 | { 213 | "cell_type": "code", 214 | "execution_count": null, 215 | "id": "63813b20", 216 | "metadata": { 217 | "tags": [ 218 | "remove-input" 219 | ] 220 | }, 221 | "outputs": [], 222 | "source": [ 223 | "population_grid = geopandas.read_file(\n", 224 | " \"https://kartta.hsy.fi/geoserver/wfs\"\n", 225 | " \"?service=wfs\"\n", 226 | " \"&version=2.0.0\"\n", 227 | " \"&request=GetFeature\"\n", 228 | " \"&typeName=asuminen_ja_maankaytto:Vaestotietoruudukko_2022\"\n", 229 | " \"&srsName=EPSG:3879\"\n", 230 | " \"&bbox=25494767,6671328,25497720,6673701,EPSG:3879\",\n", 231 | " crs=\"EPSG:3879\"\n", 232 | ")\n", 233 | "population_grid.head()" 234 | ] 235 | }, 236 | { 237 | "cell_type": "code", 238 | "execution_count": null, 239 | "id": "a3f8493f-af61-4dd6-9648-8dab16ca80a6", 240 | "metadata": {}, 241 | "outputs": [], 242 | "source": [] 243 | } 244 | ], 245 | "metadata": { 246 | "kernelspec": { 247 | "display_name": "Python 3 (ipykernel)", 248 | "language": "python", 249 | "name": "python3" 250 | }, 251 | "language_info": { 252 | "codemirror_mode": { 253 | "name": "ipython", 254 | "version": 3 255 | }, 256 | "file_extension": ".py", 257 | "mimetype": "text/x-python", 258 | "name": "python", 259 | "nbconvert_exporter": "python", 260 | "pygments_lexer": "ipython3", 261 | "version": "3.11.7" 262 | } 263 | }, 264 | "nbformat": 4, 265 | "nbformat_minor": 5 266 | } 267 | -------------------------------------------------------------------------------- /lessons/lesson-3/data/helsinki_addresses/addresses.txt: -------------------------------------------------------------------------------- 1 | id;addr 2 | 1000;Itämerenkatu 14, 00101 Helsinki, Finland 3 | 1001;Kampinkuja 1, 00100 Helsinki, Finland 4 | 1002;Kaivokatu 8, 00101 Helsinki, Finland 5 | 1003;Hermannin rantatie 1, 00580 Helsinki, Finland 6 | 1005;Tyynenmerenkatu 9, 00220 Helsinki, Finland 7 | 1006;Kontulantie 18, 00940 Helsinki, Finland 8 | 1007;Itäväylä 3, 00950 Helsinki, Finland 9 | 1008;Tapulikaupungintie 3, 00750 Helsinki, Finland 10 | 1009;Sompionpolku 2, 00730 Helsinki, Finland 11 | 1010;Atomitie 5, 00370 Helsinki, Finland 12 | 1011;Rautatientori 1, 00100 Helsinki, Finland 13 | 1012;Kuparitie 8, 00440 Helsinki, Finland 14 | 1013;Rumpupolku 8, 00420 Helsinki, Finland 15 | 1014;Mäkitorpantie 1, 00620 Helsinki, Finland 16 | 1015;Malminkaari 15, 00700 Helsinki, Finland 17 | 1016;Kylätie 23, 00320 Helsinki, Finland 18 | 1017;Malminkartanontie 17, 00410 Helsinki, Finland 19 | 1018;Oulunkylän tori 2b, 00640 Helsinki, Finland 20 | 1019;Ratapihantie 6, 00101 Helsinki, Finland 21 | 1020;Pitäjänmäentie 15, 00370 Helsinki, Finland 22 | 1021;Eskolantie 2, 00720 Helsinki, Finland 23 | 1022;Tattariharjuntie, 00700 Helsinki, Finland 24 | 1023;Tallinnanaukio 1, 00930 Helsinki, Finland 25 | 1024;Tyynylaavantie 7, 00980 Helsinki, Finland 26 | 1025;Myllypurontie 5, 00920 Helsinki, Finland 27 | 1026;Mellunmäenraitio 6, 00970 Helsinki, Finland 28 | 1027;Vaasanpolku 2, 00101 Helsinki, Finland 29 | 1028;Hiihtäjäntie 2, 00810 Helsinki, Finland 30 | 1029;Ukko-Pekan porras 2, 00570 Helsinki, Finland 31 | 1030;Siltasaarenkatu 16, 00530 Helsinki, Finland 32 | 1031;Urho Kekkosen katu 1, 00100 Helsinki, Finland 33 | 1032;Ruoholahdenkatu 17, 00101 Helsinki, Finland 34 | 1033;Tyynenmerenkatu 3, 00220 Helsinki, Finland 35 | 1034;Vilhonkatu 4, 00101 Helsinki, Finland 36 | 37 | -------------------------------------------------------------------------------- /lessons/lesson-3/data/helsinki_city_districts/SOURCE: -------------------------------------------------------------------------------- 1 | # Helsinki City Districts 2 | 3 | Downloaded and cleaned from https://hri.fi/data/en_GB/dataset/helsingin-piirijako 4 | -------------------------------------------------------------------------------- /lessons/lesson-3/data/helsinki_city_districts/helsinki_city_districts_2021.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-3/data/helsinki_city_districts/helsinki_city_districts_2021.gpkg -------------------------------------------------------------------------------- /lessons/lesson-3/geocoding-in-geopandas.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "28aa2695", 6 | "metadata": {}, 7 | "source": [ 8 | "# Geocoding in geopandas\n", 9 | "\n", 10 | "Geopandas supports geocoding via a library called\n", 11 | "[geopy](http://geopy.readthedocs.io/), which needs to be installed to use\n", 12 | "[geopandas’ `geopandas.tools.geocode()`\n", 13 | "function](https://geopandas.org/en/stable/docs/reference/api/geopandas.tools.geocode.html).\n", 14 | "`geocode()` expects a `list` or `pandas.Series` of addresses (strings) and\n", 15 | "returns a `GeoDataFrame` with resolved addresses and point geometries.\n", 16 | "\n", 17 | "Let’s try this out.\n", 18 | "\n", 19 | "We will geocode addresses stored in a semicolon-separated text file called\n", 20 | "`addresses.txt`. These addresses are located in the Helsinki Region in Southern\n", 21 | "Finland." 22 | ] 23 | }, 24 | { 25 | "cell_type": "code", 26 | "execution_count": null, 27 | "id": "a7ce03b3", 28 | "metadata": {}, 29 | "outputs": [], 30 | "source": [ 31 | "import pathlib\n", 32 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 33 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 34 | ] 35 | }, 36 | { 37 | "cell_type": "code", 38 | "execution_count": null, 39 | "id": "0bc6de80", 40 | "metadata": {}, 41 | "outputs": [], 42 | "source": [ 43 | "import pandas\n", 44 | "addresses = pandas.read_csv(\n", 45 | " DATA_DIRECTORY / \"helsinki_addresses\" / \"addresses.txt\",\n", 46 | " sep=\";\"\n", 47 | ")\n", 48 | "\n", 49 | "addresses.head()" 50 | ] 51 | }, 52 | { 53 | "cell_type": "markdown", 54 | "id": "334d162e", 55 | "metadata": {}, 56 | "source": [ 57 | "We have an `id` for each row and an address in the `addr` column.\n", 58 | "\n", 59 | "\n", 60 | "## Geocode addresses using *Nominatim*\n", 61 | "\n", 62 | "In our example, we will use *Nominatim* as a *geocoding provider*. [*Nominatim*](https://nominatim.org/) is a library and service using OpenStreetMap data, and run by the OpenStreetMap Foundation. Geopandas’\n", 63 | "[`geocode()`\n", 64 | "function](hhttps://geopandas.org/en/stable/docs/reference/api/geopandas.tools.geocode.html) supports it natively.\n", 65 | "\n", 66 | "
\n", 67 | "\n", 68 | "**Fair-use**\n", 69 | "\n", 70 | "[Nominatim’s terms of use](https://operations.osmfoundation.org/policies/nominatim/) require that users of the service ensure they don’t send more frequent requests than one per second and that a custom **user-agent** string is attached to each query.\n", 71 | "\n", 72 | "Geopandas’ implementation allows us to specify a `user_agent`, and the library also takes care of respecting Nominatim's rate limit.\n", 73 | "\n", 74 | "Looking up an address is a quite expensive database operation. This is why the public and free-to-use Nominatim server sometimes takes slightly longer to respond. In this example, we add a parameter `timeout=10` to wait up to 10 seconds for a response.\n", 75 | "\n", 76 | "
\n", 77 | "\n" 78 | ] 79 | }, 80 | { 81 | "cell_type": "code", 82 | "execution_count": null, 83 | "id": "976d52af", 84 | "metadata": {}, 85 | "outputs": [], 86 | "source": [] 87 | }, 88 | { 89 | "cell_type": "markdown", 90 | "id": "14c7d507", 91 | "metadata": {}, 92 | "source": [ 93 | "Et voilà! As a result we received a `GeoDataFrame` that contains a parsed\n", 94 | "version of our original addresses and a `geometry` column of\n", 95 | "`shapely.geometry.Point`s that we can use, for instance, to export the data to\n", 96 | "a geospatial data format.\n", 97 | "\n", 98 | "However, the `id` column was discarded in the process. To combine the input\n", 99 | "data set with our result set, we can use pandas’ [*join*\n", 100 | "operations](https://pandas.pydata.org/docs/user_guide/merging.html).\n", 101 | "\n", 102 | "\n", 103 | "## Join data frames\n", 104 | ">\n", 105 | "> **Note: Joining data sets using pandas**\n", 106 | ">\n", 107 | "> For a comprehensive overview of different ways of combining DataFrames and Series based on set theory, see the pandas documentation on [merge, join, and concatenate](https://pandas.pydata.org/pandas-docs/stable/user_guide/merging.html).\n", 108 | "\n", 109 | "\n", 110 | "\n", 111 | "Joining data from two or more data frames or tables is a common task in many\n", 112 | "(spatial) data analysis workflows. As you might remember from our earlier\n", 113 | "lessons, combining data from different tables based on common **key** attribute\n", 114 | "can be done easily in pandas/geopandas using the [`merge()`\n", 115 | "function](https://pandas.pydata.org/pandas-docs/stable/generated/pandas.DataFrame.merge.html).\n", 116 | "We used this approach in [exercise 6 of the Geo-Python\n", 117 | "course](https://geo-python-site.readthedocs.io/en/latest/lessons/L6/exercise-6.html#joining-data-from-one-dataframe-to-another).\n", 118 | "\n", 119 | "However, sometimes it is useful to join two data frames together based on their\n", 120 | "**index**. The data frames have to have the **same number of records** and\n", 121 | "**share the same index** (simply put, they should have the same order of rows).\n", 122 | "\n", 123 | "We can use this approach, here, to join information from the original data\n", 124 | "frame `addresses` to the geocoded addresses `geocoded_addresses`, row by row.\n", 125 | "The `join()` function, by default, joins two data frames based on their index.\n", 126 | "This works correctly for our example, as the order of the two data frames is\n", 127 | "identical." 128 | ] 129 | }, 130 | { 131 | "cell_type": "code", 132 | "execution_count": null, 133 | "id": "9acc2a09", 134 | "metadata": {}, 135 | "outputs": [], 136 | "source": [] 137 | }, 138 | { 139 | "cell_type": "markdown", 140 | "id": "a78615d5", 141 | "metadata": {}, 142 | "source": [ 143 | "The output of `join()` is a new `geopandas.GeoDataFrame`:" 144 | ] 145 | }, 146 | { 147 | "cell_type": "code", 148 | "execution_count": null, 149 | "id": "a8fea7b8", 150 | "metadata": {}, 151 | "outputs": [], 152 | "source": [ 153 | "type(geocoded_addresses_with_id)" 154 | ] 155 | }, 156 | { 157 | "cell_type": "markdown", 158 | "id": "031cc3a4", 159 | "metadata": {}, 160 | "source": [ 161 | "The new data frame has all original columns plus new columns for the `geometry`\n", 162 | "and for a parsed `address` that can be used to spot-check the results.\n", 163 | "\n", 164 | "> **Note**\n", 165 | ">\n", 166 | "> If you perform the join the other way around, i.e., `addresses.join(geocoded_addresses)`, the output would be a `pandas.DataFrame`, not a `geopandas.GeoDataFrame`.\n", 167 | "\n", 168 | "\n", 169 | "\n", 170 | "---\n", 171 | "\n", 172 | "\n", 173 | "It’s now easy to save the new data set as a geospatial file, for instance, in\n", 174 | "*GeoPackage* format:" 175 | ] 176 | }, 177 | { 178 | "cell_type": "code", 179 | "execution_count": null, 180 | "id": "6905c3d8", 181 | "metadata": {}, 182 | "outputs": [], 183 | "source": [ 184 | "geocoded_addresses.to_file(DATA_DIRECTORY / \"addresses.gpkg\")" 185 | ] 186 | }, 187 | { 188 | "cell_type": "markdown", 189 | "id": "3144020a-7209-41d4-9eec-b7aef672a8b7", 190 | "metadata": {}, 191 | "source": [ 192 | "
\n", 193 | "
\n", 194 | "\n", 195 | "**Understanding the difference between `join` and `merge` in GeoPandas**\n", 196 | "\n", 197 | "GeoPandas provides both `join` and `merge` functions, and while they may seem similar, they are used differently depending on the context.\n", 198 | "\n", 199 | "1. `join`: \n", 200 | " - This is primarily used for joining GeoDataFrames with a shared index. It works similarly to a SQL join based on the index of the two tables.\n", 201 | " - It is ideal for adding columns from one GeoDataFrame to another based on the index or a pre-aligned structure.\n", 202 | " \n", 203 | "2. `merge`:\n", 204 | " - `merge` allows more flexibility by enabling joins based on specific columns, not just the index. It works similarly to `pd.merge` in pandas.\n", 205 | " - It is useful for spatial joins when you want to match features based on attribute values in specific columns rather than just the index.\n", 206 | " \n", 207 | "### Example\n", 208 | "\n", 209 | "```python\n", 210 | "import geopandas as gpd\n", 211 | "\n", 212 | "# Sample GeoDataFrames\n", 213 | "gdf1 = gpd.GeoDataFrame({\n", 214 | " 'ID': [1, 2, 3],\n", 215 | " 'Name': ['Park', 'Lake', 'Forest'],\n", 216 | " 'geometry': gpd.points_from_xy([10, 20, 30], [10, 20, 30])\n", 217 | "})\n", 218 | "\n", 219 | "gdf2 = gpd.GeoDataFrame({\n", 220 | " 'ID': [1, 2, 3],\n", 221 | " 'Area_km2': [1.5, 2.1, 3.3]\n", 222 | "})\n", 223 | "\n", 224 | "# Using `join` - joins based on index\n", 225 | "joined = gdf1.set_index('ID').join(gdf2.set_index('ID'))\n", 226 | "print(\"Using `join`:\\n\", joined)\n", 227 | "\n", 228 | "# Using `merge` - joins based on a column\n", 229 | "merged = gdf1.merge(gdf2, on='ID')\n", 230 | "print(\"Using `merge`:\\n\", merged)\n", 231 | "```\n", 232 | "
" 233 | ] 234 | }, 235 | { 236 | "cell_type": "code", 237 | "execution_count": null, 238 | "id": "39a10a6e-48a9-4756-8d35-e83a6263f624", 239 | "metadata": {}, 240 | "outputs": [], 241 | "source": [] 242 | } 243 | ], 244 | "metadata": { 245 | "kernelspec": { 246 | "display_name": "Python 3 (ipykernel)", 247 | "language": "python", 248 | "name": "python3" 249 | }, 250 | "language_info": { 251 | "codemirror_mode": { 252 | "name": "ipython", 253 | "version": 3 254 | }, 255 | "file_extension": ".py", 256 | "mimetype": "text/x-python", 257 | "name": "python", 258 | "nbconvert_exporter": "python", 259 | "pygments_lexer": "ipython3", 260 | "version": "3.9.19" 261 | } 262 | }, 263 | "nbformat": 4, 264 | "nbformat_minor": 5 265 | } 266 | -------------------------------------------------------------------------------- /lessons/lesson-3/intersect.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8c12359f", 6 | "metadata": {}, 7 | "source": [ 8 | "# Intersect\n", 9 | " \n", 10 | "Similar to the spatial relationships `within` and `contains` covered in the [previous section](point-in-polygon-queries), another common geospatial query asks whether two geometries intersect or touch.\n", 11 | "\n", 12 | "Both queries are implemented in `shapely`:\n", 13 | "- [`intersects()`](https://shapely.readthedocs.io/en/stable/manual.html#object.intersects): two objects intersect if the boundary or interior of one object intersect in any way with the boundary or interior of the other object.\n", 14 | "- [`touches()`](https://shapely.readthedocs.io/en/stable/manual.html#object.touches): two objects touch if the objects have at least one point in common, but their interiors do not intersect with any part of the other object.\n", 15 | "\n", 16 | "Let’s try these functions out, for instance, using two lines:" 17 | ] 18 | }, 19 | { 20 | "cell_type": "code", 21 | "execution_count": null, 22 | "id": "f8adb3de", 23 | "metadata": {}, 24 | "outputs": [], 25 | "source": [ 26 | "import shapely.geometry\n", 27 | "\n", 28 | "line1 = shapely.geometry.LineString([(0, 0), (1, 1)])\n", 29 | "line2 = shapely.geometry.LineString([(1, 1), (0, 2)])" 30 | ] 31 | }, 32 | { 33 | "cell_type": "code", 34 | "execution_count": null, 35 | "id": "22ac6b0e", 36 | "metadata": {}, 37 | "outputs": [], 38 | "source": [] 39 | }, 40 | { 41 | "cell_type": "markdown", 42 | "id": "c16f4c0a", 43 | "metadata": {}, 44 | "source": [ 45 | "The lines intersect. Do they also touch?" 46 | ] 47 | }, 48 | { 49 | "cell_type": "code", 50 | "execution_count": null, 51 | "id": "36610144", 52 | "metadata": {}, 53 | "outputs": [], 54 | "source": [] 55 | }, 56 | { 57 | "cell_type": "markdown", 58 | "id": "9c5c7d8b", 59 | "metadata": {}, 60 | "source": [ 61 | "`line1` touches `line2`. Adding them both to a multi-line is a quick way of\n", 62 | "drawing them inside a Jupyter notebook:" 63 | ] 64 | }, 65 | { 66 | "cell_type": "code", 67 | "execution_count": null, 68 | "id": "6962e9fb", 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "shapely.geometry.MultiLineString([line1, line2])" 73 | ] 74 | }, 75 | { 76 | "cell_type": "markdown", 77 | "id": "8204feaa", 78 | "metadata": {}, 79 | "source": [ 80 | "We can see here, that the share the point `(1, 1)`, in which `line1` ends, and\n", 81 | "`line2` begins. The two lines do not intersect otherwise (‘in their interior’),\n", 82 | "so the predicament ’`touch()`’ - as defined above - is true.\n", 83 | "\n", 84 | "If the lines would share some of their interior, that would not be counted as\n", 85 | "touching. For instance, `line1` does not touch `line1` (itself), but fulfils\n", 86 | "all requirements to be counted as `intersect()`ing with itself:" 87 | ] 88 | }, 89 | { 90 | "cell_type": "code", 91 | "execution_count": null, 92 | "id": "798148f0", 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": null, 100 | "id": "8d3f14ab", 101 | "metadata": {}, 102 | "outputs": [], 103 | "source": [] 104 | } 105 | ], 106 | "metadata": { 107 | "kernelspec": { 108 | "display_name": "Python 3 (ipykernel)", 109 | "language": "python", 110 | "name": "python3" 111 | }, 112 | "language_info": { 113 | "codemirror_mode": { 114 | "name": "ipython", 115 | "version": 3 116 | }, 117 | "file_extension": ".py", 118 | "mimetype": "text/x-python", 119 | "name": "python", 120 | "nbconvert_exporter": "python", 121 | "pygments_lexer": "ipython3", 122 | "version": "3.9.19" 123 | } 124 | }, 125 | "nbformat": 4, 126 | "nbformat_minor": 5 127 | } 128 | -------------------------------------------------------------------------------- /lessons/lesson-3/point-in-polygon-queries.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "ae0a4b2f", 6 | "metadata": {}, 7 | "source": [ 8 | "# Point-in-polygon queries\n", 9 | "\n", 10 | "Finding out if a certain point is located inside or outside of an area,\n", 11 | "or finding out if a line intersects with another line or polygon are\n", 12 | "fundamental geospatial operations that are often used e.g. to select\n", 13 | "data based on location. Such spatial queries are one of the typical\n", 14 | "first steps of the workflow when doing spatial analysis. Performing a\n", 15 | "spatial join (will be introduced later) between two spatial datasets is\n", 16 | "one of the most typical applications where Point in Polygon (PIP) query\n", 17 | "is used.\n", 18 | "\n", 19 | "For further reading about PIP and other geometric operations,\n", 20 | "see Chapter 4.2 in Smith, Goodchild & Longley: [Geospatial Analysis - 6th edition](https://www.spatialanalysisonline.com/HTML/index.html).\n", 21 | "\n", 22 | "\n", 23 | "## How to check if point is inside a polygon?\n", 24 | "\n", 25 | "Computationally, detecting if a point is inside a polygon is most commonly done using a specific formula called [Ray Casting algorithm](https://en.wikipedia.org/wiki/Point_in_polygon#Ray_casting_algorithm).\n", 26 | "Luckily, we do not need to create such a function ourselves for\n", 27 | "conducting the Point in Polygon (PIP) query. Instead, we can take\n", 28 | "advantage of [Shapely's binary predicates](https://shapely.readthedocs.io/en/stable/manual.html#binary-predicates)\n", 29 | "that can evaluate the topolocical relationships between geographical\n", 30 | "objects, such as the PIP as we're interested here.\n", 31 | "\n", 32 | "## Point-in-polygon queries on `shapely` geometries\n", 33 | "\n", 34 | "There are basically two ways of conducting PIP in Shapely:\n", 35 | "\n", 36 | "1. using a function called\n", 37 | " [within()](https://shapely.readthedocs.io/en/stable/manual.html#object.within)\n", 38 | " that checks if a point is within a polygon\n", 39 | "2. using a function called\n", 40 | " [contains()](https://shapely.readthedocs.io/en/stable/manual.html#object.contains)\n", 41 | " that checks if a polygon contains a point\n", 42 | "\n", 43 | "\n", 44 | "> **Note**\n", 45 | ">\n", 46 | "> Even though we are discussing a **Point** in Polygon operation, it is also possible to check if a LineString or Polygon is inside another Polygon.\n", 47 | "\n", 48 | "\n", 49 | "\n", 50 | "Let’s first create a couple of point geometries:" 51 | ] 52 | }, 53 | { 54 | "cell_type": "code", 55 | "execution_count": null, 56 | "id": "290dd955", 57 | "metadata": {}, 58 | "outputs": [], 59 | "source": [ 60 | "import shapely.geometry\n", 61 | "point1 = shapely.geometry.Point(24.952242, 60.1696017)\n", 62 | "point2 = shapely.geometry.Point(24.976567, 60.1612500)" 63 | ] 64 | }, 65 | { 66 | "cell_type": "markdown", 67 | "id": "28b431a5", 68 | "metadata": {}, 69 | "source": [ 70 | "... and a polygon:" 71 | ] 72 | }, 73 | { 74 | "cell_type": "code", 75 | "execution_count": null, 76 | "id": "0f5c3e95", 77 | "metadata": {}, 78 | "outputs": [], 79 | "source": [ 80 | "polygon = shapely.geometry.Polygon(\n", 81 | " [\n", 82 | " (24.950899, 60.169158),\n", 83 | " (24.953492, 60.169158),\n", 84 | " (24.953510, 60.170104),\n", 85 | " (24.950958, 60.169990)\n", 86 | " ]\n", 87 | ")" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": null, 93 | "id": "7476a932", 94 | "metadata": {}, 95 | "outputs": [], 96 | "source": [ 97 | "print(point1)\n", 98 | "print(point2)\n", 99 | "print(polygon)" 100 | ] 101 | }, 102 | { 103 | "cell_type": "markdown", 104 | "id": "cc25c707", 105 | "metadata": {}, 106 | "source": [ 107 | "Let’s check if the points are `within()` the polygon:" 108 | ] 109 | }, 110 | { 111 | "cell_type": "code", 112 | "execution_count": null, 113 | "id": "9475a971", 114 | "metadata": {}, 115 | "outputs": [], 116 | "source": [] 117 | }, 118 | { 119 | "cell_type": "code", 120 | "execution_count": null, 121 | "id": "91b5b69f", 122 | "metadata": {}, 123 | "outputs": [], 124 | "source": [] 125 | }, 126 | { 127 | "cell_type": "markdown", 128 | "id": "f327796e", 129 | "metadata": {}, 130 | "source": [ 131 | "It seems that the first point is inside the polygon, but the second one is not.\n", 132 | "\n", 133 | "We can turn the logic of the look-up around: Rather than check of the point is\n", 134 | "within the polygon, we can also ask whether the polygon `contains()` the point:" 135 | ] 136 | }, 137 | { 138 | "cell_type": "code", 139 | "execution_count": null, 140 | "id": "b672d7df", 141 | "metadata": {}, 142 | "outputs": [], 143 | "source": [] 144 | }, 145 | { 146 | "cell_type": "code", 147 | "execution_count": null, 148 | "id": "880fe0b7", 149 | "metadata": {}, 150 | "outputs": [], 151 | "source": [] 152 | }, 153 | { 154 | "cell_type": "markdown", 155 | "id": "2919e35a", 156 | "metadata": {}, 157 | "source": [ 158 | "> **Hint:** The two ways of checking the spatial relationship are complementary and yield\n", 159 | "> equivalent results; [`contains()`](https://shapely.readthedocs.io/en/stable/manual.html#object.contains)\n", 160 | "> is inverse to [`within()`](https://shapely.readthedocs.io/en/stable/manual.html#object.within),\n", 161 | "> and vice versa.\n", 162 | ">\n", 163 | "> Then, which one should you use? Well, it depends:\n", 164 | ">\n", 165 | "> - If you have **many points and just one polygon** and want to find out which points are inside the polygon, you might need to iterate over the points and check one at a time if it is **within()** the polygon.\n", 166 | "> - If you have **many polygons and just one point** and want to find out which polygon contains the point, you might need to iterate over the polygons until you find one that **contains()** the point.\n", 167 | "\n", 168 | "\n", 169 | "\n", 170 | "\n", 171 | "## Point-in-polygon queries on `geopandas.GeoDataFrame`s\n", 172 | "\n", 173 | "In the following practical example we find which of the addresses we obtained\n", 174 | "in the [geocoding section](geocoding-in-geopandas) are located within a certain\n", 175 | "city district of Helsinki.\n", 176 | "\n", 177 | "The data set we are using is from [Helsinki Region Infoshare](https://hri.fi/data/en_GB/dataset/helsingin-piirijako), and licensed under a [Creative-Commons-Attribution-4.0](https://creativecommons.org/licenses/by/4.0/) license." 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": null, 183 | "id": "d14e025e", 184 | "metadata": {}, 185 | "outputs": [], 186 | "source": [ 187 | "import pathlib\n", 188 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 189 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 190 | ] 191 | }, 192 | { 193 | "cell_type": "code", 194 | "execution_count": null, 195 | "id": "98d96acc", 196 | "metadata": {}, 197 | "outputs": [], 198 | "source": [ 199 | "import geopandas\n", 200 | "\n", 201 | "city_districts = geopandas.read_file(\n", 202 | " DATA_DIRECTORY / \"helsinki_city_districts\" / \"helsinki_city_districts_2021.gpkg\"\n", 203 | ")\n", 204 | "city_districts.head()" 205 | ] 206 | }, 207 | { 208 | "cell_type": "code", 209 | "execution_count": null, 210 | "id": "8336a478", 211 | "metadata": {}, 212 | "outputs": [], 213 | "source": [] 214 | }, 215 | { 216 | "cell_type": "markdown", 217 | "id": "4a60eb6d", 218 | "metadata": {}, 219 | "source": [ 220 | "Specifically, we want to find out which points are within the ‘Eteläinen’\n", 221 | "(‘southern’) city district. Let’s start by obtaining a separate data set for\n", 222 | "this district, loading the addresses data, and plotting a multi-layer map\n", 223 | "that shows all districts, the ‘Eteläinen’ district, and all the points in\n", 224 | "one map:" 225 | ] 226 | }, 227 | { 228 | "cell_type": "code", 229 | "execution_count": null, 230 | "id": "07b46735", 231 | "metadata": {}, 232 | "outputs": [], 233 | "source": [ 234 | "southern_district = city_districts[city_districts.name == \"Eteläinen\"]\n", 235 | "southern_district" 236 | ] 237 | }, 238 | { 239 | "cell_type": "code", 240 | "execution_count": null, 241 | "id": "bfa33f67", 242 | "metadata": {}, 243 | "outputs": [], 244 | "source": [ 245 | "addresses = geopandas.read_file(DATA_DIRECTORY / \"addresses.gpkg\")" 246 | ] 247 | }, 248 | { 249 | "cell_type": "markdown", 250 | "id": "14edd522", 251 | "metadata": {}, 252 | "source": [ 253 | "> **Plotting multiple map layers**\n", 254 | ">\n", 255 | "> To plot several map layers in one figure, use the `ax` parameter to specify in which *axes* data should be plotted. This was used in [lesson 7 of Geo-Python](https://geo-python-site.readthedocs.io/en/latest/notebooks/L7/matplotlib.html) to add text to a plot or modify axes properties.\n", 256 | ">\n", 257 | "> The easiest way to obtain an *axes* is to save the return value of the first `plot()` (see below). Another option is to create [`subplots()`](https://geo-python-site.readthedocs.io/en/latest/notebooks/L7/advanced-plotting.html#using-subplots), possibly with only one row and one column.\n" 258 | ] 259 | }, 260 | { 261 | "cell_type": "code", 262 | "execution_count": null, 263 | "id": "be5a78b6", 264 | "metadata": {}, 265 | "outputs": [], 266 | "source": [ 267 | "axes = city_districts.plot(facecolor=\"grey\")\n", 268 | "southern_district.plot(ax=axes, facecolor=\"red\")\n", 269 | "addresses.plot(ax=axes, color=\"blue\", markersize=5)" 270 | ] 271 | }, 272 | { 273 | "cell_type": "markdown", 274 | "id": "8e4079b6", 275 | "metadata": {}, 276 | "source": [ 277 | "Some points are within the ‘Eteläinen’ district, but others are not. To find\n", 278 | "out which are the ones inside the district, we can use a **point-in-polygon\n", 279 | "query**, this time on the entire `geopandas.GeoDataFrame`. Its method\n", 280 | "`within()` returns Boolean (`True`/`False`) values that indicate whether or not\n", 281 | "a row’s geometry is contained in the supplied *other* geometry:\n", 282 | "\n", 283 | "\n", 284 | "
\n", 285 | "\n", 286 | "**Geometry vs. geometry column**\n", 287 | "\n", 288 | "In the example below, we use `southern.at[0, \"geometry\"]` to obtain a single value, a `shapely.geometry.Polygon`, instead of an entire column (a `GeoSeries`). This ensures that each row’s geometry in the `addresses` data frame is matched against *the same polygon*. In contrast, if we ran `within()` against a column, the operation would be carried out row-wise: the first address point would be checked against the first polygon, the second address point against the second polygon, and so forth.\n", 289 | "\n", 290 | "Check the [documentation for `within()`](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoSeries.within.html) to learn more!\n", 291 | "\n", 292 | "
\n", 293 | "\n", 294 | "\n" 295 | ] 296 | }, 297 | { 298 | "cell_type": "code", 299 | "execution_count": null, 300 | "id": "2af63e25", 301 | "metadata": {}, 302 | "outputs": [], 303 | "source": [] 304 | }, 305 | { 306 | "cell_type": "markdown", 307 | "id": "4555e5bc", 308 | "metadata": {}, 309 | "source": [ 310 | "This list of Boolean values, also called a *mask array* can be used to filter\n", 311 | "the input data frame:" 312 | ] 313 | }, 314 | { 315 | "cell_type": "code", 316 | "execution_count": null, 317 | "id": "a30030e8", 318 | "metadata": {}, 319 | "outputs": [], 320 | "source": [ 321 | "addresses_in_the_southern_district = addresses[\n", 322 | " addresses.within(southern_district.at[0, \"geometry\"])\n", 323 | "]\n", 324 | "addresses_in_the_southern_district" 325 | ] 326 | }, 327 | { 328 | "cell_type": "markdown", 329 | "id": "6cd8811b", 330 | "metadata": {}, 331 | "source": [ 332 | "Finally, let’s plot this list of addresses one more time to visually verify\n", 333 | "that all of them, indeed, are located within the ‘Eteläinen’ city district:" 334 | ] 335 | }, 336 | { 337 | "cell_type": "code", 338 | "execution_count": null, 339 | "id": "32bc57f5", 340 | "metadata": {}, 341 | "outputs": [], 342 | "source": [ 343 | "axes = city_districts.plot(facecolor=\"grey\")\n", 344 | "southern_district.plot(ax=axes, facecolor=\"red\")\n", 345 | "\n", 346 | "addresses_in_the_southern_district.plot(\n", 347 | " ax=axes,\n", 348 | " color=\"gold\",\n", 349 | " markersize=5\n", 350 | ")" 351 | ] 352 | }, 353 | { 354 | "cell_type": "markdown", 355 | "id": "f8816344", 356 | "metadata": {}, 357 | "source": [ 358 | "Perfect! Now we are left with only the (golden) points which, indeed, are\n", 359 | "inside the red polygon. That’s exactly what we wanted!" 360 | ] 361 | } 362 | ], 363 | "metadata": { 364 | "kernelspec": { 365 | "display_name": "Python 3 (ipykernel)", 366 | "language": "python", 367 | "name": "python3" 368 | }, 369 | "language_info": { 370 | "codemirror_mode": { 371 | "name": "ipython", 372 | "version": 3 373 | }, 374 | "file_extension": ".py", 375 | "mimetype": "text/x-python", 376 | "name": "python", 377 | "nbconvert_exporter": "python", 378 | "pygments_lexer": "ipython3", 379 | "version": "3.9.19" 380 | } 381 | }, 382 | "nbformat": 4, 383 | "nbformat_minor": 5 384 | } 385 | -------------------------------------------------------------------------------- /lessons/lesson-3/spatial-join.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "8d2d34a2", 6 | "metadata": {}, 7 | "source": [ 8 | "# Spatial join\n", 9 | "\n", 10 | "*Spatial joins* are operations that combine data from two or more spatial data\n", 11 | "sets based on their geometric relationship. In the previous sections, we got to\n", 12 | "know two specific cases of spatial joins: [Point-in-polygon\n", 13 | "queries](point-in-polygon-queries) and [intersects-queries](intersect). However,\n", 14 | "there is more to using the geometric relationship between features and between\n", 15 | "entire layers.\n", 16 | "\n", 17 | "Spatial join operations require two input parameters: the *predicament*, i.e., the\n", 18 | "geometric condition that needs to be met between two geometries, and the\n", 19 | "*join-type*: whether only rows with matching geometries are kept, or all of one\n", 20 | "input table’s rows, or all records. \n", 21 | "\n", 22 | "*Geopandas* (using `shapely` to implement geometric relationships) [supports a\n", 23 | "standard set of geometric\n", 24 | "predicates](https://geopandas.org/en/stable/docs/user_guide/mergingdata.html#binary-predicate-joins),\n", 25 | "that is similar to most GIS analysis tools and applications:\n", 26 | "\n", 27 | "- intersects\n", 28 | "- contains\n", 29 | "- within\n", 30 | "- touches\n", 31 | "- crosses\n", 32 | "- overlaps\n", 33 | "\n", 34 | "Geometric predicaments are expressed as verbs, so they have an intuitive\n", 35 | "meaning. See the [shapely user\n", 36 | "manual](https://shapely.readthedocs.io/en/stable/manual.html#binary-predicates)\n", 37 | "for a detailed description of each geometric predicate.\n", 38 | "\n", 39 | "\n", 40 | "
\n", 41 | "\n", 42 | "**Binary geometric predicates**\n", 43 | "\n", 44 | "Shapely supports more *binary geometric predicates* than those geopandas implements for spatial joins. What are they? Can they be expressed by combining the implemented ones?\n", 45 | "\n", 46 | "
\n", 47 | "\n", 48 | "\n", 49 | "\n", 50 | "In terms of the *join-type*, geopandas implements three different options:\n", 51 | "\n", 52 | "- *left*: keep all records of the *left* data frame, fill with empty values if\n", 53 | " no match, keep *left* geometry column\n", 54 | "- *right*: keep all records of the *left* data frame, fill with empty values if\n", 55 | " no match, keep *right* geometry column\n", 56 | "- *inner*: keep only records of matching records, keep *left* geometry column\n", 57 | "\n", 58 | "\n", 59 | "
\n", 60 | "\n", 61 | "**Tip**\n", 62 | "\n", 63 | "The [PyGIS book](https://pygis.io/docs/e_spatial_joins.html) provides a great overview of spatial predicates and join-types, complete with explanatory drawings.\n", 64 | "\n", 65 | "
\n", 66 | "\n", 67 | "\n", 68 | "\n", 69 | "---\n", 70 | "\n", 71 | "\n", 72 | "## Load input data\n", 73 | "\n", 74 | "As a practical example, let’s find the population density at each of the\n", 75 | "addresses from [earlier in this lesson](geocoding-in-geopandas), by combining\n", 76 | "the data set with data from a population grid.\n", 77 | "\n", 78 | "The population grid data is available from [HSY, the Helsinki Region\n", 79 | "Environmental\n", 80 | "Services](https://www.hsy.fi/en/environmental-information/open-data/), for\n", 81 | "instance via their WFS endpoint." 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "id": "72fc59e3", 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [ 91 | "import pathlib \n", 92 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 93 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 94 | ] 95 | }, 96 | { 97 | "cell_type": "code", 98 | "execution_count": null, 99 | "outputs": [], 100 | "source": [ 101 | "import geopandas\n", 102 | "\n", 103 | "addresses = geopandas.read_file(DATA_DIRECTORY / \"addresses.gpkg\")\n", 104 | "\n", 105 | "population_grid = geopandas.read_file(\n", 106 | " (\n", 107 | " \"https://kartta.hsy.fi/geoserver/wfs\"\n", 108 | " \"?service=wfs\"\n", 109 | " \"&version=2.0.0\"\n", 110 | " \"&request=GetFeature\"\n", 111 | " \"&typeName=asuminen_ja_maankaytto:Vaestotietoruudukko_2020\"\n", 112 | " \"&srsName=EPSG:3879\"\n", 113 | " ),\n", 114 | ")\n", 115 | "population_grid.crs = \"EPSG:3879\" # for WFS data, the CRS needs to be specified manually" 116 | ], 117 | "metadata": { 118 | "collapsed": false 119 | }, 120 | "id": "fc0472b39e03fdc0" 121 | }, 122 | { 123 | "cell_type": "markdown", 124 | "id": "3dfc3673", 125 | "metadata": {}, 126 | "source": [ 127 | "
\n", 128 | "\n", 129 | "**Concatenating long strings**\n", 130 | "\n", 131 | "In the WFS address above, we split a long string across multiple lines. Strings within parentheses are automatically concatenated (joined together) without needing any operator (e.g., `+`).\n", 132 | "\n", 133 | "For clarity, the example includes an additional set of parentheses, but the parentheses of the method call would suffice.\n", 134 | "\n", 135 | "
\n", 136 | "\n", 137 | "\n", 138 | "\n", 139 | "---" 140 | ] 141 | }, 142 | { 143 | "cell_type": "code", 144 | "execution_count": null, 145 | "id": "f5b204ce", 146 | "metadata": {}, 147 | "outputs": [], 148 | "source": [] 149 | }, 150 | { 151 | "cell_type": "markdown", 152 | "id": "c331d3f1", 153 | "metadata": {}, 154 | "source": [ 155 | "The population grid has many columns, and all of its column names are in\n", 156 | "Finnish. Let’s drop (delete) all of the columns except the population total,\n", 157 | "and rename the remaining to English:" 158 | ] 159 | }, 160 | { 161 | "cell_type": "code", 162 | "execution_count": null, 163 | "id": "a3f66ff9", 164 | "metadata": {}, 165 | "outputs": [], 166 | "source": [ 167 | "population_grid = population_grid[[\"asukkaita\", \"geometry\"]]\n", 168 | "population_grid = population_grid.rename(columns={\"asukkaita\": \"population\"})" 169 | ] 170 | }, 171 | { 172 | "cell_type": "markdown", 173 | "id": "5ce81946", 174 | "metadata": {}, 175 | "source": [ 176 | "Finally, calculate the population density by dividing the number of inhabitants\n", 177 | "of each grid cell by its area in km²:" 178 | ] 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": null, 183 | "id": "b3309506", 184 | "metadata": {}, 185 | "outputs": [], 186 | "source": [ 187 | "# Calculate population density\n", 188 | "population_grid[\"population_density\"] = (\n", 189 | " population_grid[\"population\"]\n", 190 | " / (population_grid.area / 1_000_000)\n", 191 | ")\n", 192 | "# View the head\n", 193 | "population_grid.head()" 194 | ] 195 | }, 196 | { 197 | "cell_type": "markdown", 198 | "id": "636f8992", 199 | "metadata": {}, 200 | "source": [ 201 | "
\n", 202 | "\n", 203 | "**Tip: Coding style - big numbers, operators in multi-line expressions**\n", 204 | "\n", 205 | "When using very large numbers, such as *1 million* to convert m² to km², you can use underscore characters (`_`) as thousands separators. The Python interpreter treats numbers with underscores as regular numeric values. [This syntax also works for grouping numbers](https://peps.python.org/pep-0515/) by other logics, like hexadecimal or binary values.\n", 206 | "\n", 207 | "For expressions like mathematical formulas that spread across multiple lines, it's good coding style to place an operator at the beginning of a new line rather than trailing it on the previous line. This improves readability, as explained in the [PEP-8 styling guidelines](https://peps.python.org/pep-0008/#should-a-line-break-before-or-after-a-binary-operator).\n", 208 | "\n", 209 | "
\n", 210 | "\n", 211 | "\n", 212 | "\n", 213 | "---\n", 214 | "\n", 215 | "\n", 216 | "## Join input layers\n", 217 | "\n", 218 | "\n", 219 | "Now we are ready to perform the spatial join between the two layers.\n", 220 | "Remember: the aim is to find the population density around each of the address\n", 221 | "points. We want to attach population density information from the\n", 222 | "`population_grid` polygon layer to the `addresses` point layer, depending on\n", 223 | "whether the **point is within the polygon**. During this operation, we want to\n", 224 | "**retain the geometries of the point layer**.\n", 225 | "\n", 226 | "Before we can go ahead with the join operation, we have to make sure the two\n", 227 | "layers are in the same cartographic reference system:" 228 | ] 229 | }, 230 | { 231 | "cell_type": "code", 232 | "execution_count": null, 233 | "id": "48ee97dc", 234 | "metadata": { 235 | "tags": [ 236 | "raises-exception" 237 | ] 238 | }, 239 | "outputs": [], 240 | "source": [ 241 | "assert addresses.crs == population_grid.crs, \"CRS are not identical\"" 242 | ] 243 | }, 244 | { 245 | "cell_type": "markdown", 246 | "id": "5067c00c", 247 | "metadata": {}, 248 | "source": [ 249 | "They do not share the same CRS, let’s reproject one of them:" 250 | ] 251 | }, 252 | { 253 | "cell_type": "code", 254 | "execution_count": null, 255 | "id": "90f6a30a", 256 | "metadata": {}, 257 | "outputs": [], 258 | "source": [ 259 | "population_grid = population_grid.to_crs(addresses.crs)" 260 | ] 261 | }, 262 | { 263 | "cell_type": "markdown", 264 | "id": "790c253d", 265 | "metadata": {}, 266 | "source": [ 267 | "Now we are ready to carry out the actual spatial join using the\n", 268 | "[`geopandas.GeoDataFrame.sjoin()`](https://geopandas.org/en/stable/docs/reference/api/geopandas.GeoDataFrame.sjoin.html)\n", 269 | "method. Remember, we want to use a *within* geometric predicate and retain the\n", 270 | "point layer’s geometries (in the example below the *left* data frame)." 271 | ] 272 | }, 273 | { 274 | "cell_type": "code", 275 | "execution_count": null, 276 | "id": "907435a6", 277 | "metadata": {}, 278 | "outputs": [], 279 | "source": [] 280 | }, 281 | { 282 | "cell_type": "markdown", 283 | "id": "e16161f7", 284 | "metadata": {}, 285 | "source": [ 286 | "That looks great! We now have an address data set with population density\n", 287 | "information attached to it. \n", 288 | "\n", 289 | "\n", 290 | "---\n", 291 | "\n", 292 | "\n", 293 | "As a final task, let’s look at how to plot data using a *graduated*\n", 294 | "cartographic visualisation scheme. \n", 295 | "\n", 296 | "The `geopandas.GeoDataFrame.plot()` method can vary the map colours depending on a column’s values by passing its name as a named argument `column`. On top of that, the method accepts many arguments to influence the style of the map. Among them are `scheme` and `cmap` that define the [categorisation scheme](https://geopandas.org/en/stable/gallery/choropleths.html), and the [colour map](https://matplotlib.org/stable/tutorials/colors/colormaps.html) used. Many more arguments are passed through to `matplotlib`, such as `markersize` to set the size of point symbols, and `facecolor` to set the colour of polygon areas. To draw a legend, set `legend` to `True`, to set the size of the figure, pass a tuple (with values in inch) as `figsize`." 297 | ] 298 | }, 299 | { 300 | "cell_type": "code", 301 | "execution_count": null, 302 | "id": "71381d3a", 303 | "metadata": {}, 304 | "outputs": [], 305 | "source": [ 306 | "ax = addresses_with_population_data.plot(\n", 307 | " figsize=(10, 10),\n", 308 | " column=\"population_density\",\n", 309 | " cmap=\"Reds\",\n", 310 | " scheme=\"quantiles\",\n", 311 | " markersize=15,\n", 312 | " legend=True\n", 313 | ")\n", 314 | "ax.set_title(\"Population density around address points\")" 315 | ] 316 | }, 317 | { 318 | "cell_type": "markdown", 319 | "id": "0d13b9bc", 320 | "metadata": {}, 321 | "source": [ 322 | "---\n", 323 | "\n", 324 | "\n", 325 | "We can apply the same arguments to plot a population density map using the\n", 326 | "entire `population_grid` data set:" 327 | ] 328 | }, 329 | { 330 | "cell_type": "code", 331 | "execution_count": null, 332 | "id": "bc52ce88", 333 | "metadata": {}, 334 | "outputs": [], 335 | "source": [ 336 | "ax = population_grid.plot(\n", 337 | " figsize=(10, 10),\n", 338 | " column=\"population_density\",\n", 339 | " cmap=\"Reds\",\n", 340 | " scheme=\"quantiles\",\n", 341 | " legend=True\n", 342 | ")\n", 343 | "ax.set_title(\"Population density in the Helsinki metropolitan area\")\n" 344 | ] 345 | }, 346 | { 347 | "cell_type": "markdown", 348 | "id": "d7fa3747", 349 | "metadata": {}, 350 | "source": [ 351 | "---\n", 352 | "\n", 353 | "\n", 354 | "Finally, remember to save the output data frame to a file. We can append it to\n", 355 | "the existing *GeoPackage* by specifying a new layer name:" 356 | ] 357 | }, 358 | { 359 | "cell_type": "code", 360 | "execution_count": null, 361 | "id": "2da86431", 362 | "metadata": {}, 363 | "outputs": [], 364 | "source": [ 365 | "addresses_with_population_data.to_file(\n", 366 | " DATA_DIRECTORY / \"addresses.gpkg\",\n", 367 | " layer=\"addresses_with_population_data\"\n", 368 | ")\n" 369 | ] 370 | } 371 | ], 372 | "metadata": { 373 | "kernelspec": { 374 | "display_name": "Python 3 (ipykernel)", 375 | "language": "python", 376 | "name": "python3" 377 | }, 378 | "language_info": { 379 | "codemirror_mode": { 380 | "name": "ipython", 381 | "version": 3 382 | }, 383 | "file_extension": ".py", 384 | "mimetype": "text/x-python", 385 | "name": "python", 386 | "nbconvert_exporter": "python", 387 | "pygments_lexer": "ipython3", 388 | "version": "3.9.19" 389 | } 390 | }, 391 | "nbformat": 4, 392 | "nbformat_minor": 5 393 | } 394 | -------------------------------------------------------------------------------- /lessons/lesson-4/data/amazon_river/amazon_river.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-4/data/amazon_river/amazon_river.gpkg -------------------------------------------------------------------------------- /lessons/lesson-4/data/helsinki_municipality/helsinki_municipality.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-4/data/helsinki_municipality/helsinki_municipality.gpkg -------------------------------------------------------------------------------- /lessons/lesson-4/data/helsinki_region_travel_times_to_railway_station/helsinki_region_travel_times_to_railway_station.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-4/data/helsinki_region_travel_times_to_railway_station/helsinki_region_travel_times_to_railway_station.gpkg -------------------------------------------------------------------------------- /lessons/lesson-4/images/overlay-operations_700x200px.svg: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lessons/lesson-4/simplifying-geometries.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "4b06f1ac", 6 | "metadata": {}, 7 | "source": [ 8 | "# Simplifying geometries\n", 9 | "\n", 10 | "\n", 11 | "Sometimes it might be useful to be able to simplify geometries. This could be\n", 12 | "something to consider for example when you have very detailed spatial features\n", 13 | "that cover the whole world. If you make a map that covers the whole world, it\n", 14 | "is unnecessary to have really detailed geometries because it is simply\n", 15 | "impossible to see those small details from your map. Furthermore, it takes a\n", 16 | "long time to actually render a large quantity of features into a map. Here, we\n", 17 | "will see how it is possible to simplify geometric features in Python.\n", 18 | "\n", 19 | "As an example we will use data representing the Amazon river in South America,\n", 20 | "and simplify it's geometries.\n", 21 | "\n", 22 | "Let's first read the data and see how the river looks like:" 23 | ] 24 | }, 25 | { 26 | "cell_type": "code", 27 | "execution_count": null, 28 | "id": "b3252766", 29 | "metadata": {}, 30 | "outputs": [], 31 | "source": [ 32 | "import pathlib \n", 33 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 34 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 35 | ] 36 | }, 37 | { 38 | "cell_type": "code", 39 | "execution_count": null, 40 | "id": "459c69e8", 41 | "metadata": {}, 42 | "outputs": [], 43 | "source": [ 44 | "import geopandas\n", 45 | "\n", 46 | "amazon = geopandas.read_file(DATA_DIRECTORY / \"amazon_river\" / \"amazon_river.gpkg\")\n", 47 | "\n", 48 | "amazon.head()" 49 | ] 50 | }, 51 | { 52 | "cell_type": "code", 53 | "execution_count": null, 54 | "id": "85221a2d", 55 | "metadata": {}, 56 | "outputs": [], 57 | "source": [] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": null, 62 | "id": "99227c3b", 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "id": "66ab6b50", 70 | "metadata": {}, 71 | "source": [ 72 | "The LineString that is presented here is quite detailed, so let's see how we\n", 73 | "can generalize them a bit. As we can see from the coordinate reference system,\n", 74 | "the data is projected in a system using [Mercator projection based on\n", 75 | "SIRGAS datum](http://spatialreference.org/ref/sr-org/7868/), and metres as a unit. \n", 76 | "\n", 77 | "Generalization can be done easily by using a Shapely function called\n", 78 | "`.simplify()`. The `tolerance` parameter can be used to adjusts how much\n", 79 | "geometries should be generalized. **The tolerance value is tied to the\n", 80 | "coordinate system of the geometries**. Hence, the value we pass here is 20 000\n", 81 | "**meters** (20 kilometers)." 82 | ] 83 | }, 84 | { 85 | "cell_type": "code", 86 | "execution_count": null, 87 | "id": "5e94fc62", 88 | "metadata": {}, 89 | "outputs": [], 90 | "source": [ 91 | "# Generalize geometry\n", 92 | "\n", 93 | "# Set geometry to be our new simlified geometry\n", 94 | "\n", 95 | "# Plot \n" 96 | ] 97 | }, 98 | { 99 | "cell_type": "markdown", 100 | "id": "a630364b", 101 | "metadata": {}, 102 | "source": [ 103 | "Nice! As a result, now we have simplified our LineString quite significantly as we can see from the map." 104 | ] 105 | } 106 | ], 107 | "metadata": { 108 | "kernelspec": { 109 | "display_name": "Python 3 (ipykernel)", 110 | "language": "python", 111 | "name": "python3" 112 | }, 113 | "language_info": { 114 | "codemirror_mode": { 115 | "name": "ipython", 116 | "version": 3 117 | }, 118 | "file_extension": ".py", 119 | "mimetype": "text/x-python", 120 | "name": "python", 121 | "nbconvert_exporter": "python", 122 | "pygments_lexer": "ipython3", 123 | "version": "3.11.7" 124 | } 125 | }, 126 | "nbformat": 4, 127 | "nbformat_minor": 5 128 | } 129 | -------------------------------------------------------------------------------- /lessons/lesson-4/vector-data-aggregating.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "abc40def", 6 | "metadata": {}, 7 | "source": [ 8 | "# Aggregating data\n", 9 | "\n", 10 | "Data aggregation refers to a process where we combine data into groups. When\n", 11 | "doing spatial data aggregation, we merge the geometries together into coarser\n", 12 | "units (based on some attribute), and can also calculate summary statistics for\n", 13 | "these combined geometries from the original, more detailed values. For example,\n", 14 | "suppose that we are interested in studying continents, but we only have\n", 15 | "country-level data like the country dataset. If we aggregate the data by\n", 16 | "continent, we would convert the country-level data into a continent-level\n", 17 | "dataset.\n", 18 | "\n", 19 | "In this tutorial, we will aggregate our travel time data by car travel times\n", 20 | "(column `car_r_t`), i.e. the grid cells that have the same travel time to\n", 21 | "Railway Station will be merged together.\n", 22 | "\n", 23 | "Let’s start with loading `intersection.gpkg`, the output file of the\n", 24 | "[previous section](overlay-analysis):" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": null, 30 | "id": "a403c5a4", 31 | "metadata": {}, 32 | "outputs": [], 33 | "source": [ 34 | "import pathlib \n", 35 | "NOTEBOOK_PATH = pathlib.Path().resolve()\n", 36 | "DATA_DIRECTORY = NOTEBOOK_PATH / \"data\"" 37 | ] 38 | }, 39 | { 40 | "cell_type": "code", 41 | "execution_count": null, 42 | "id": "f378228b", 43 | "metadata": {}, 44 | "outputs": [], 45 | "source": [ 46 | "import geopandas\n", 47 | "intersection = geopandas.read_file(DATA_DIRECTORY / \"intersection.gpkg\")" 48 | ] 49 | }, 50 | { 51 | "cell_type": "markdown", 52 | "id": "6693e43e", 53 | "metadata": {}, 54 | "source": [ 55 | "For doing the aggregation we will use a method called `dissolve()` that takes\n", 56 | "as input the column that will be used for conducting the aggregation:" 57 | ] 58 | }, 59 | { 60 | "cell_type": "code", 61 | "execution_count": null, 62 | "id": "77c910f3", 63 | "metadata": {}, 64 | "outputs": [], 65 | "source": [] 66 | }, 67 | { 68 | "cell_type": "markdown", 69 | "id": "4e7c17ef", 70 | "metadata": {}, 71 | "source": [ 72 | "Let’s compare the number of cells in the layers before and after the\n", 73 | "aggregation:" 74 | ] 75 | }, 76 | { 77 | "cell_type": "code", 78 | "execution_count": null, 79 | "id": "d5384910", 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "print(f\"Rows in original intersection GeoDataFrame: {len(intersection)}\")\n", 84 | "print(f\"Rows in dissolved layer: {len(dissolved)}\")" 85 | ] 86 | }, 87 | { 88 | "cell_type": "markdown", 89 | "id": "a0e36673", 90 | "metadata": {}, 91 | "source": [ 92 | "Indeed the number of rows in our data has decreased and the Polygons were\n", 93 | "merged together.\n", 94 | "\n", 95 | "What actually happened here? Let's take a closer look. \n", 96 | "\n", 97 | "Let's see what columns we have now in our GeoDataFrame:" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": null, 103 | "id": "5974abc2", 104 | "metadata": {}, 105 | "outputs": [], 106 | "source": [] 107 | }, 108 | { 109 | "cell_type": "markdown", 110 | "id": "9c154bdf", 111 | "metadata": {}, 112 | "source": [ 113 | "As we can see, the column that we used for conducting the aggregation\n", 114 | "(`car_r_t`) can not be found from the columns list anymore. What happened to\n", 115 | "it?\n", 116 | "\n", 117 | "Let’s take a look at the indices of our GeoDataFrame:" 118 | ] 119 | }, 120 | { 121 | "cell_type": "code", 122 | "execution_count": null, 123 | "id": "84ebf623", 124 | "metadata": {}, 125 | "outputs": [], 126 | "source": [] 127 | }, 128 | { 129 | "cell_type": "markdown", 130 | "id": "ba3604a9", 131 | "metadata": {}, 132 | "source": [ 133 | "Aha! Well now we understand where our column went. It is now used as index in\n", 134 | "our `dissolved` GeoDataFrame. \n", 135 | "\n", 136 | "Now, we can for example select only such geometries from the layer that are for\n", 137 | "example exactly 15 minutes away from the Helsinki Railway Station:" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": null, 143 | "id": "d3ae90fa", 144 | "metadata": {}, 145 | "outputs": [], 146 | "source": [] 147 | }, 148 | { 149 | "cell_type": "code", 150 | "execution_count": null, 151 | "id": "3a6ffd69", 152 | "metadata": {}, 153 | "outputs": [], 154 | "source": [] 155 | }, 156 | { 157 | "cell_type": "code", 158 | "execution_count": null, 159 | "id": "db343b8b", 160 | "metadata": {}, 161 | "outputs": [], 162 | "source": [] 163 | }, 164 | { 165 | "cell_type": "markdown", 166 | "id": "fe871e1b", 167 | "metadata": {}, 168 | "source": [ 169 | "As we can see, as a result, we have now a Pandas `Series` object containing\n", 170 | "basically one row from our original aggregated GeoDataFrame.\n", 171 | "\n", 172 | "Let’s also visualize those 15 minute grid cells.\n", 173 | "\n", 174 | "First, we need to convert the selected row back to a GeoDataFrame:" 175 | ] 176 | }, 177 | { 178 | "cell_type": "code", 179 | "execution_count": null, 180 | "id": "837478b6", 181 | "metadata": {}, 182 | "outputs": [], 183 | "source": [] 184 | }, 185 | { 186 | "cell_type": "markdown", 187 | "id": "1b667fdb", 188 | "metadata": {}, 189 | "source": [ 190 | "Plot the selection on top of the entire grid:" 191 | ] 192 | }, 193 | { 194 | "cell_type": "code", 195 | "execution_count": null, 196 | "id": "4eed5bd2", 197 | "metadata": {}, 198 | "outputs": [], 199 | "source": [] 200 | }, 201 | { 202 | "cell_type": "markdown", 203 | "id": "eab57c25", 204 | "metadata": {}, 205 | "source": [ 206 | "Another way to visualize the travel times in the entire GeoDataFrame is to plot using one specific column. In order to use our `car_r_t` column, which is now the index of the GeoDataFrame, we need to reset the index:" 207 | ] 208 | }, 209 | { 210 | "cell_type": "code", 211 | "execution_count": null, 212 | "id": "a1b714fe", 213 | "metadata": {}, 214 | "outputs": [], 215 | "source": [] 216 | }, 217 | { 218 | "cell_type": "markdown", 219 | "id": "be428696", 220 | "metadata": {}, 221 | "source": [ 222 | "As we can see, we now have our `car_r_t` as a column again, and can then plot the GeoDataFrame passing this column using the `column` parameter:" 223 | ] 224 | }, 225 | { 226 | "cell_type": "code", 227 | "execution_count": null, 228 | "id": "96f0f780", 229 | "metadata": {}, 230 | "outputs": [], 231 | "source": [] 232 | }, 233 | { 234 | "cell_type": "markdown", 235 | "id": "08a152a1-7ff6-4b2b-b7b2-6919e0b93df7", 236 | "metadata": {}, 237 | "source": [ 238 | "> **How Are Other Columns Aggregated During `dissolve`?** \n", 239 | "> \n", 240 | "> When using the `dissolve` method in GeoPandas (e.g., `dissolved = intersection.dissolve(by=\"car_r_t\")`), here's how other columns are aggregated:\n", 241 | "> \n", 242 | "> ### Default Behavior:\n", 243 | "> - **Default Aggregation Function:** `aggfunc='first'`\n", 244 | "> - Keeps the **first value** from each group for columns that are not involved in the aggregation (i.e., not the `by` column).\n", 245 | "> - For multiple rows grouped together, only the first row's values are retained for other columns.\n", 246 | "> \n", 247 | "> ### Custom Aggregation:\n", 248 | "> You can control how other columns are aggregated using the `aggfunc` parameter:\n", 249 | "> ```python\n", 250 | "> dissolved = intersection.dissolve(by=\"car_r_t\", aggfunc=\"sum\")\n", 251 | "> ```\n", 252 | "> Supported aggregation functions include:\n", 253 | "> - `\"sum\"`: Sum of the values in the group.\n", 254 | "> - `\"mean\"`: Average of the values in the group.\n", 255 | "> - `\"min\"`: Minimum value in the group.\n", 256 | "> - `\"max\"`: Maximum value in the group.\n", 257 | "> - `\"first\"`: First value in the group (default).\n", 258 | "> - `\"last\"`: Last value in the group.\n", 259 | "> - Custom aggregation using a `lambda` function.\n", 260 | "> \n", 261 | "> ### Using Multiple Aggregations:\n", 262 | "> To apply different aggregations to different columns, you can do further aggregation manually:\n", 263 | "> ```python\n", 264 | "> dissolved = intersection.dissolve(by=\"car_r_t\")\n", 265 | "> dissolved = dissolved.groupby(\"car_r_t\").agg({\n", 266 | "> \"column1\": \"sum\",\n", 267 | "> \"column2\": \"mean\",\n", 268 | "> \"column3\": \"max\"\n", 269 | "> })\n", 270 | "> ```\n", 271 | "> \n", 272 | "> ### Geometry Aggregation:\n", 273 | "> - The geometries in the grouped rows are **merged (unioned)** into a single geometry for each group." 274 | ] 275 | }, 276 | { 277 | "cell_type": "code", 278 | "execution_count": null, 279 | "id": "d29bfdfc-2741-4b31-878e-7dc1d47f3050", 280 | "metadata": {}, 281 | "outputs": [], 282 | "source": [] 283 | } 284 | ], 285 | "metadata": { 286 | "kernelspec": { 287 | "display_name": "Python 3 (ipykernel)", 288 | "language": "python", 289 | "name": "python3" 290 | }, 291 | "language_info": { 292 | "codemirror_mode": { 293 | "name": "ipython", 294 | "version": 3 295 | }, 296 | "file_extension": ".py", 297 | "mimetype": "text/x-python", 298 | "name": "python", 299 | "nbconvert_exporter": "python", 300 | "pygments_lexer": "ipython3", 301 | "version": "3.11.7" 302 | } 303 | }, 304 | "nbformat": 4, 305 | "nbformat_minor": 5 306 | } 307 | -------------------------------------------------------------------------------- /lessons/lesson-5/data/addresses.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-5/data/addresses.gpkg -------------------------------------------------------------------------------- /lessons/lesson-5/data/helsinki_region_travel_times_to_railway_station/helsinki_region_travel_times_to_railway_station.gpkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-5/data/helsinki_region_travel_times_to_railway_station/helsinki_region_travel_times_to_railway_station.gpkg -------------------------------------------------------------------------------- /lessons/lesson-6/data/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-6/data/.keep -------------------------------------------------------------------------------- /lessons/lesson-7/data/L4133A.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/L4133A.tif -------------------------------------------------------------------------------- /lessons/lesson-7/data/L4133B.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/L4133B.tif -------------------------------------------------------------------------------- /lessons/lesson-7/data/L4133C.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/L4133C.tif -------------------------------------------------------------------------------- /lessons/lesson-7/data/L4133D.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/L4133D.tif -------------------------------------------------------------------------------- /lessons/lesson-7/data/U4234A.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/U4234A.tif -------------------------------------------------------------------------------- /lessons/lesson-7/data/sentinel2_Nuuksio_small.tif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/data/sentinel2_Nuuksio_small.tif -------------------------------------------------------------------------------- /lessons/lesson-7/exercise-6.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "ccfb29e8", 6 | "metadata": {}, 7 | "source": [ 8 | "# Exercise 3\n", 9 | "\n", 10 | "> **Deadline**\n", 11 | "> \n", 12 | "> Please complete this exercise **by the end of day** on Thursday, 19 December, 2024 (the day before next week’s work session).\n", 13 | "\n", 14 | "\n", 15 | "To start this assignment, [accept the GitHub classroom\n", 16 | "assignment](https://classroom.github.com/a/AoeAxwR5), and clone *your own*\n", 17 | "repository, e.g., in a [CSC\n", 18 | "Noppe](../../course-info/course-environment)\n", 19 | "instance. Make sure you commit and push all changes you make (you can\n", 20 | "revisit instructions on how to use `git` and the JupyterLab git-plugin\n", 21 | "on the [website of the Geo-Python\n", 22 | "course](https://geo-python-site.readthedocs.io/en/latest/lessons/L2/git-basics.html).\n", 23 | "\n", 24 | "To preview the exercise without logging in, you can find the open course copy\n", 25 | "of the course’s GitHub repository at\n", 26 | "[github.com/Automating-GIS-processes-II-2024/Exercise-3](https://github.com/Automating-GIS-processes-II-2024/Exercise-3).\n", 27 | "Don’t attempt to commit changes to that repository, but rather work with your\n", 28 | "personal GitHub classroom copy (see above).\n", 29 | "\n", 30 | "\n", 31 | "## Hints\n", 32 | "\n", 33 | "### Division by zero in raster calculation\n", 34 | "\n", 35 | "When working with raster files or bands, one of the quickest ways to upset the mathematical gods of Python is to divide by zero. It’s like giving Python a riddle it can’t solve—it just throws its hands up (and an error). To avoid this, you can replace the zero values with `NaN`. This way, Python knows how to handle `NaN`s . Here’s an example:\n", 36 | "\n", 37 | "```python\n", 38 | "# Avoid division by zero by setting NDVI to NaN where NIR + Red is zero\n", 39 | "NDVI = NDVI.where((nir_data + red_data) != 0)\n", 40 | "```\n" 41 | ] 42 | }, 43 | { 44 | "cell_type": "code", 45 | "execution_count": null, 46 | "id": "034823a0-a252-4bab-ac9a-1db3d0d2ce98", 47 | "metadata": {}, 48 | "outputs": [], 49 | "source": [] 50 | } 51 | ], 52 | "metadata": { 53 | "kernelspec": { 54 | "display_name": "Python 3 (ipykernel)", 55 | "language": "python", 56 | "name": "python3" 57 | }, 58 | "language_info": { 59 | "codemirror_mode": { 60 | "name": "ipython", 61 | "version": 3 62 | }, 63 | "file_extension": ".py", 64 | "mimetype": "text/x-python", 65 | "name": "python", 66 | "nbconvert_exporter": "python", 67 | "pygments_lexer": "ipython3", 68 | "version": "3.11.7" 69 | } 70 | }, 71 | "nbformat": 4, 72 | "nbformat_minor": 5 73 | } 74 | -------------------------------------------------------------------------------- /lessons/lesson-7/fig/raster_rep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/fig/raster_rep.png -------------------------------------------------------------------------------- /lessons/lesson-7/fig/yllas.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Automating-GIS-processes/notebooks/e809e7df469a75afcf9a1736d9131270f4ef7c72/lessons/lesson-7/fig/yllas.jpg -------------------------------------------------------------------------------- /lessons/lesson-7/overview.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "id": "0893de9f-ce8b-4036-bf2b-a2ea64bcef8c", 6 | "metadata": {}, 7 | "source": [ 8 | "# Overview\n", 9 | "\n", 10 | "In this lesson, we explore the fundamentals of raster data analysis and processing using Python, focusing on both elevation models and satellite imagery. We’ll cover practical geospatial techniques such as raster classification, slope analysis, and essential raster operations. The lesson integrates popular geospatial libraries like [rioxarray](https://corteva.github.io/rioxarray/stable/getting_started/getting_started.html), [rasterio](https://rasterio.readthedocs.io/en/latest/), and [xarray](https://xarray.pydata.org/en/stable/) for efficient data handling and analysis.\n", 11 | "\n", 12 | "## Learning Goals:\n", 13 | "\n", 14 | "After this lesson, you will be able to:\n", 15 | "\n", 16 | "- Import and visualize single-band and multi-band raster data using `rioxarray` and `rasterio`\n", 17 | "- Merge multiple raster files together and create a `raster mosaic`\n", 18 | "- Clip raster using a polygon\n", 19 | "- Perform raster classification \n", 20 | "- Conduct terrain analysis, such as calculating slope from elevation models\n", 21 | "- Perform raster calculations\n", 22 | "\n", 23 | "\n", 24 | "# Lecture video\n", 25 | "\n", 26 | "Will be added following the lecture. " 27 | ] 28 | }, 29 | { 30 | "cell_type": "code", 31 | "execution_count": null, 32 | "id": "5dd9eb21-47cd-4938-90e7-1eec0af52881", 33 | "metadata": {}, 34 | "outputs": [], 35 | "source": [] 36 | } 37 | ], 38 | "metadata": { 39 | "kernelspec": { 40 | "display_name": "Python 3 (ipykernel)", 41 | "language": "python", 42 | "name": "python3" 43 | }, 44 | "language_info": { 45 | "codemirror_mode": { 46 | "name": "ipython", 47 | "version": 3 48 | }, 49 | "file_extension": ".py", 50 | "mimetype": "text/x-python", 51 | "name": "python", 52 | "nbconvert_exporter": "python", 53 | "pygments_lexer": "ipython3", 54 | "version": "3.11.7" 55 | } 56 | }, 57 | "nbformat": 4, 58 | "nbformat_minor": 5 59 | } 60 | -------------------------------------------------------------------------------- /lessons/lesson-7/raster-part1.rst: -------------------------------------------------------------------------------- 1 | Working with Raster 2 | =========== 3 | 4 | .. raw:: html 5 | :file: Raster_lesson.html --------------------------------------------------------------------------------