Land cover classification using a Naives Bayes algorithm with Python - Tutorial

Machine learning can be applied to many fields as land cover classification from remote sensing imagery. The performance and accuracy of classification will depend on the number of raster bands, the image resolution, the land cover type and the algorithm used. This tutorial will perform an applied case of land cover classification from a panchromatic image in Python using the Naives Bayes algorithm implemented on the Scikit Learn package. The classification will cover four categories as: rivers, river beaches, woods and pastures; coding is performed under a Jupyter Notebook with Python running from a geospatial Conda environment. Some graphics and statistics about the classification precision are also included on the tutorial.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to georeference a image/raster with Python and Rasterio - Tutorial

Georeferencing in Python has the advantage that it can be performed repeatedly without the need to define control points each time. It also allows you to add/remove control points and observe the impact on the transformation array. This tutorial demonstrates the complete georeferencing process of a national map using 3 points whose pixel coordinates have been extracted from the Paint utility in Windows. The tutorial also exports the raster while assigning a reference system.

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to reproject, clip and interactively plot HDFs with Python and GDAL - Tutorial

Large amount of spatial data is indexed and delivered through files in Hierarchical Data Format (HDF). These files are compatible with desktop GIS software as QGIS but they are not so easy to open/read/process with standard Python libraries as Rasterio, or with dedicated libraries. On our research we found the spatial functionality on the powerful GDAL binaries and library for Python. 

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

State of the art of open digital elevation imagery and online watershed delineation - Tutorial

The processes of working with digital elevation models (DEMs) and watershed delineation are in constant change over time. Even though the elevation datasets date from 10 years ago; the web servers and tools for data processing have changed in recent years. With online tools such as Hatari Utils, the watershed delineation can be performed in a few steps with practical outputs as vector files and watershed statistics.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Online main channel determination from a river network with Hatari Utils - Tutorial

If you want to determine the longest channel of a river network automatically this feature Hatari Utils might be of your interest. Hatari Utils is a toolbox for different analysis in water resources and beyond. On the “watershed delimitation” tool you can define the catchment, the river network and now you can define the main channel (longest succession of segments that connect a source to the outlet of the basin) automatically on the catchment delineation.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to measure strike and dip from rasters with QGIS and ThreePointMethod plugin - Tutorial

If you have a geological contact as a geospatial and you want to calculate/measure the strike and dip at a certain point, this tutorial might help you. The ThreePointMethod is a QGIS plugin that calculates a plane strike and dip direction using the three-point method. It works with a point shapefile and a digital elevation model.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Groundwater flow modeling using Dupuit approximation with Python and Landlab - Tutorial

This tutorial covers a simulation example of groundwater flow and groundwater discharge with the GroundwaterDupuitPercolator component of Landlab. Simulation is run on steady state over a one layer aquifer and results are plotted on charts and grids.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Land Cover Change Analysis with Python and Rasterio - Tutorial

This tutorial covers the complete procedure to create a land cover change raster from a comparison of generated vegetation index (NDVI) rasters by the use of Python and the Numpy and Rasterio libraries. Results of the NDVI for given years and NDVI change are plotted on Jupyter Lab as color grid and contour grid.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Geospatial representation drone camera coordinates with Python and Folium - Tutorial

If you have a set of drone imagery and you want to know the location and direction of the camera, this tutorial might be interesting for you. We have done an applied example that retrieves the geospatial metadata from the drone camera for a group of images and makes a geostapatial repretacion on a map with the image name available as popup. The tutorial is done under a Jupyter notebook with Python and Folium.

Read More
1 Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Geospatial Python class to extract vertices inside a polygon - Tutorial

We have to redefine the way we do our geospatial analysis. It is not enough to know the "tool" but to master the "process" if we want to provide spatial solutions for the always bigger geospatial data available. We have done a simple process of extracting vertices from polygons, lines and points inside a polygon in Python, but not a simple and declarative script but as a Python class.

Read More
1 Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

NDVI calculation from Landsat 8 images with R and Terra package - Tutorial

On the exploration for advanced tools for spatial analysis we took a chance on making raster algebra with R and the Terra package tutorial. This is an applied example of NDVI calculation from the red and near infrared bands from a Landsat 8 image. The script covers all steps from band load, array algebra and export as geospatial raster.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Performance analysis over Python and R for raster algebra - a case of NDVI calculation

We believe that tasks / studies that involve the massive analysis of vector and raster spatial data would become more popular in the near future. With massive analysis some factors became more relevant such as the computer memory, processor type, operating system and the programming language or platform used for the calculation.

We make a case study of raster analysis in Windows where the Python and R were installed with their spatial packages from conda repositories. Our computer skills don't allow us to have a sense of the differences in the performance of these scripts in Linux.

Read More
2 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to install the R spatial library Terra on a conda enviroment - Tutorial

We have researched advanced tools as programming languages for spatial analysis, so far Python was our de facto choice because of its learning rate and easy to use. However, when working with a high amount of data and performing massive spatial queries some questions arise about the performance of Python and then we look at some other options as R, Julia or Rust. We have made a tutorial for the installation of the advanced spatial package Terra on a R kernel in Jupyter under a Conda environment, the tutorial covers all the installation steps in Windows together with some examples to load and plot vector and raster data.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Modeling Land Evolution at Basin Scale with Python and Landlab - Tutorial

Climate changes, people change and land also changes with time. We can`t believe that the river networks will remain the same over the next 1000 years or that mountains and depressions will have the same elevation in the next 10000 years. But changes are not related to huge time frames, they can occur in decades or years at lower rates as well. In order to evaluate those changes we need some formulation of the key components of land evolution: fluvial, hillslope and uplift. We have developed a tutorial with Python and the Landlab library to simulate the land evolution at basin scale for 100 thousand years; inputs come from geospatial rasters and output data is exported as Ascii raster files.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

VOCs and PFAs Interactive Spatiotemporal Representation with Python and Folium - Tutorial

Analysis of groundwater chemistry is a difficult task for the limited set of monitoring samples, the limited samples and the limited analized components. In order to assess the actual extension of a contamination plume or the efficiency of remediation techniques we need new and innovative methods to plot and analyze water chemistry data with open source data. We have done an applied case of interactive VOCs and PFAs representation on a Jupyter notebook with Python, Folium and Ipywidgets. The dataset has more than 3300 samples of 127 points over a period of 30 years and corresponds to a contaminated site of a former airfield.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Mplleaflet vs Folium to plot your weather stations on a Jupyter Notebook

When analyzing climate data or any other geospatial data on a Jupyter Notebook, we need to plot points, lines and polygons interactively. Based on our own way to learn Python, most probably we will use a library that we found on Google or Stackoverflow however there are some undercover issues on the library selection that we will discuss in this article.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Applied case of hydrogeological conceptual modeling on a hillslope area with QGIS

In order to understand the relationship between groundwater flow and slope stability, a study area over a hotspot in the US. Landslide Inventory was selected. The geology, groundwater wells, elevation, and climate conditions were reviewed to develop a hydrogeological conceptual model that will be the basis for a numerical model of the groundwater flow regime. This webinar deals with the review of available spatial data related to the groundwater flow regime on a hillslope area at Mukilteo city, Washington, US. Information from geology, meteorology, observation data and boundary conditions will be discussed in a QGIS session with regards to the construction of a groundwater numerical model in MODFLOW.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

Data extraction and spatial / 3D representation from BGS borehole data in AGS format with Python

Open lithology datasets are scarce and most times they come in certain exchange formats that can´t be easily coupled with other softwares. Python has the tools to read and extract data from those files and provide them in more friendly formats as csv or xlsx. With the use of spatial libraries as Fiona or 3D visualization libraries as Pyvistas we can go one step further and process our data as shapefiles or vtks.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

The best Youtube channels in QGIS (and open source GIS tools)

Education is aimed to acquire knowledge and it's based on the learning process and as any process has some steps and means that have to be analyzed. Traditionally, if you want to get knowledge you can go to a university, get a degree, visit a library, but why don’t you just check a Youtube channel; will you get the same knowledge? Will you do better research with what you learned on video? Those are excellent questions to pose in these times where we need knowledge that shapes our future in the context of climate change.

Read More
Comment

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.

 

How to create a point/line/polygon shapefile with Python and Fiona - Tutorial

Storage, management and analysis of geospatial vector data as an ESRI shapefile is a common procedure of GIS and related professionals. The generation of these spatial files can be done not only on a desktop software but also by Python commands. We have created an applied example that shows the procedure in Python to create point, line, and polygon shapefiles from a csv file by the use of the Fiona library.

Read More
6 Comments

 

Suscribe to our online newsletter

Subscribe for free newsletter, receive news, interesting facts and dates of our courses in water resources.