How to geolocate drone imagery from a csv table with Python and Piexif - Tutorial

If your drone doesn´t write the GPS position on the image metadata, this is a tutorial that might be of your interest. When you have the images without any location reference and the image location on another text file you can use the code described below to generate geolocated drone imagery compatible with OpenDroneMap. The tutorial shows all the steps involved besides it has some sample data to practice.

Read More
4 Comments

 

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 geospatial Raster from XY data with Python, Pandas and Rasterio - Tutorial

Another tutorial done under the concept of “geospatial python”. The tutorial shows the procedure to run a Scipy interpolation over a Pandas dataframe of point related data having a 2D Numpy array as an output. With some procedures of Rasterio the Numpy array was transformed into a monoband geospatial Tiff raster.

Read More
4 Comments

 

Suscribe to our online newsletter

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

 

How to join lines and densify vertices with Python, Fiona, Shapely - Tutorial

We have done a tutorial under the concept of "applied geospatial Python". This is an example that deals with a selective filtering of a determined road from a road geopackage. The selected road is composed of a group of lines that are merged into a Shapely LineString. Based on a Numpy linspace with the Shapely interpolate function, a set of points were distributed along the merged line path and later interpreted as a LineString. Resulting line was saved as a ESRI Shapefile file with Fiona.

Read More
Comment

 

Suscribe to our online newsletter

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

 

Convert from Excel Spreadsheet to Point Shapefile with Python, Pandas & Fiona - Tutorial

We have done a tutorial with a workaround procedure in Python with Pandas and Fiona of a common and but multi-step process to create point shapefiles from excel spreadsheets. The process involve some lines of code to read the excel file, define the output shapefile structure and write the point 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.

 

How to clip polygon layers with Python, Fiona and Shapely - Tutorial

This tutorial shows the entire procedure to clip a polygon layer to an area of interest in Python with the use of spatial libraries as Fiona and Shapely. The tutorial opens the polygon and clip layer as fiona elements, interpret the geometries as shapely Polygon datatypes, clip the polygons and store results as an output shapefile with the corresponding metadata.

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.

 

Geospatial triangular interpolation with Python, Scipy, Geopandas and Rasterio - Tutorial

Under the concept of “applied geospatial Python” we have developed some procedures / tutorials of some common spatial analysis tasks done on desktop GIS software. The aim isn’t to reinvent the wheel but to explore the current Python tools and libraries that can create, analyze and represent both vector and raster spatial data.

Triangular interpolation is one of several types of interpolation techniques available in both Python and GIS software, however the advantage of working with Python is that the interpolation is a function where you can get the interpolated value on a specific point while in GIS software you are required to create a raster and sample values from the raster (.. as far as we know).

We have created a tutorial with a complete procedure in Python to import points with elevation as a attribute, creates a triangular interpolation function and has two spatial outputs: an interpolated geospatial raster in TIFF format and a shapefile with elevation attribute for another set of points. The tutorial uses several Python libraries as Matplotlib, Rasterio, Geopandas, Scipy.

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.

 

3D Visualization of Well Lithology with Python, Pyvista and VTK - Tutorial

There are standards for the lithology descriptions, but there are no standards about how to store lithological information and relate it to the drilling position. This disorder leads to the use of many formats and data files related to open and proprietary software.

In the search of “one tool that manages all tools”, as a similar concept of the “one ring that rule them all” from the Lord of the Rings (J.R.R Tolkien), we found that Python and its libraries: Pandas, Pyvista and VTK can do a decent job on the compilation, geotransformation, spatial location, and 3d geometry generation.

This tutorial deals with the 3D visualization as Vtk files on Paraview of the lithological information from hundreds of wells located on the Snake River - Idaho. The tutorial covers all steps from the download of the raw information processing to the list and arrays generation for the vtk file. The scripting work was done on a Jupyter Nobebook and the output 3D files were plotted on Paraview.

Read More
4 Comments

 

Suscribe to our online newsletter

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

 

How to smooth a Aster DEM elevation raster with QGIS 3 - Tutorial

In developed parts of the world there are online elevation repositories with current and historical elevation data from field surveys, lidar, etc. However, for the rest of the world, the availability of online resources for elevation with adequate resolution are scarce. The ASTER Global Digital Elevation Model 1 arc second (ASTGTM v003) is one of the most reliable sources for elevation worldwide with a cell resolution of 30m and interpreted from "recent" images (from 2000 to 2013). In flat or vegetated areas the procedure to interpreted elevations face some complexities and the Aster DEM images show some bumps or high elevation spots that are not coherent when contrasting the elevation model with satellite panchromatic images. This tutorial shows a procedure to smooth the Aster elevation models with standard QGIS 3 tools on a practical exercise over a study area. The procedure can be applied to Alos Palsar images or any other noisy elevation raster.

Read More
3 Comments

 

Suscribe to our online newsletter

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

 

How to create an Elevation Raster from Contour Lines with Python, Geopandas, Numpy and Gdal - Tutorial

Spatial analysis is such an interesting discipline because it allows the evaluation of every phenomena related to their location. However, for some parts of the data processing the workflow on a GIS Graphical Computer Interface (GUI) can be repetitive and time consuming. Researchers need better and more efficient tools to process more amount of data in less amount of time and even with less quantity of software tools.

We have create a innovative script to generate an elevation raster file from a contour line with several steps of data processing. The script recognizes invalid geometries, simplify the polylines and extract vertices while creates a point geodataframe that is interpolated and geotransformed as a geospatial raster in .tiff format.

Read More
3 Comments

 

Suscribe to our online newsletter

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

 

Produced Water Chemistry and Isotope Analysis with Python and Pandas - Tutorial

On hydrocarbon extraction, water is a byproduct that comes from the geologic formations that have also oil and gas. Produced water can be defined as fossil water, or water with a high residence time on the earth, with a particular water chemistry that is important to analyze when we deal with the treatment methods, disposal techniques or safety to drinking water sources. The USGS has developed a produced water geochemical database with more than 100K points that includes spatial information, well description, rock properties, water chemistry and isotopes.

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 fill missing Elevations to empty Contour Lines with PyQGIS

Elevation contour lines without the elevation attribute is common when we import contour lines from Autocad DXF files, but it has also happened that contour data was stored on a hard disk drive without elevation attribute and years later data is found and there is no one to ask to restore the missing information. This tutorial shows a practical procedure to fill missing elevations on contour lines with the use of PyQGIS on QGIS 3. The procedure uses an intersection line that crosses the contour lines where the base elevation and interval is known. There are some specific instructions to run the script that are well described on the video.

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.

 

How to Convert a PDF to ESRI Shapefile with Python, Geopandas and Inkscape - Tutorial

In order to use the spatial data provided on a report we need procedures to extract the data on effective way. The amount of tools and techniques are quite advanced, and requires several open source software for specific procedures. We have done a complete tutorial with all the step required to extract the vector spatial data of a map reported as PDF into a ESRI shapefile. For this tutorial we have used Inkscape for the conversion of the PDF to DXF, QGIS to extract some information of the DXF, Python and Geopandas on a Jupyter Lab session for spatial translation and scaling.

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.

 

How to convert an ArcGIS Style to QGIS 3 - Tutorial

Spatial data created / processed by commercial or open source software follows standards by institutions like the Open Geospatial Consortium; this standards allow the interoperability of the vector or raster data among different software however standards apply to the position but not the style. Styles from ArcGIS were not easy to convert to formats compatible with QGIS, specially if you don’t have the commercial software.

Governmental offices release spatial data as land use, land cover, infraestructures, and sometimes release styles in ArcGIS formats posing a great obstacle for the QGIS users. This tutorial shows the complete procedure to convert ArcGIS Style to QGIS as *.xml format with a case study of land cover from Costa Rica. The tutorial is developed in Windows, if you are a Linux and Mac users its necessary to install Mdbtools on your own operating system.

Read More
7 Comments

 

Suscribe to our online newsletter

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

 

How to get Geospatial Weather Information with QGIS and QWeather - Tutorial

Quick tutorial about how to get geospatial weather data in QGIS using the QWeather plugin. This plugin connects QGIS with the Yahoo Weather API and retrives all information from a location or a lat/long coordinate. Weather data is available for the current day and data is represent as a geojson file.

The tutorial shows the common procedure to retrieve data for capitals and explore the location and metadata information available of precipitation, wind (speed, direction), temperature and humidity. It is possible to setup a defined location list using a .csv file; for the tutorial, main cities in Saxony, Germany were selected.

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.

 

View and Manage your QGIS Spatial Data in Android with Q Field - Tutorial

QField is a plugin now in version 1.0 developed by OPENGIS.ch that brings customized maps to a Android devices with the QField for QGIS app. This tutorial shows the complete procedure to create a QGIS project from lines and points with a background map; the project is packed for QField and then ported on a Android device though bluetooth, sd card, usb, or a online service. Once the QField files are on the Android device, the project can be opened with the app and the actual location can be displayed on the screen.

The workflow is fluid and we see high potential in many professional and scientific fields for bringing processed spatial data to fieldwork.

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 GDAL - Tutorial

Satellite imagery brought us the capacity to see the land surface on recent years but we haven’t been so successful to understand land cover dynamics and the interaction with economical, sociological and political factors. Some deficiencies were found on the use of GIS commercial software, but there are other limitations in the way we apply logical and mathematical processes to a set of satellite imagery. Working with geospatial data on Python gives us the capability to filter, calculate, clip, loop, and export raster or vector datasets with an efficient use of the computational power providing a bigger scope on data analysis.

This tutorial shows 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 GDAL libraries. Contours of land cover change where generated with some tools of GDAL and Osgeo and an analysis of deforestation were done based on the output data and historical images from Google Earth.

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.

 

How to clip multiple Landsat 8 Bands with Python and GDAL - Tutorial

Current GIS desktop applications are fully capable of this spatial management and analysis when the amount of raster images is limited; however when we deal with high amount of images the spatial processing on a graphical user interfase (GUI) can be slow and most commonly impractical. The use of programming / processing languages like Python and advanced spatial libraries as GDAL (gdal.org) helps on the spatial data transformation on a more abstract and effective way. This tutorial shows the complete procedure to clip the complete set of bands from a Landsat 8 image and store them with a suffix on every band file on another folder.

The tutorial is done on a interactive Python programming platform called Jupyter Notebook. The input files: raster bands and area of interest (AOI) shapefile need to be on the same system of reference (SRC), otherwise the GDAL library cannot locate the spatial data on the right position. The tutorial shows the procedure for the whole set of band form a Landsat 8 image, an example for a single band is provided on the scripts of the input data. Finally the tutorial shows the complete and clipped raster on a GIS desktop software as QGIS.

Read More
5 Comments

 

Suscribe to our online newsletter

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

 

NDVI calculation from Landsat8 images with Python 3 and Rasterio - Tutorial

Satellite images are georasters, these images are a regular array of columns and rows (a matrix per band) with a georeferenciation. Python is a programming and data analysis language very versatile for the matrix algebra with the Numpy library, however there was no efective and simple way to process a georaster until the development of the Rasterio package.

Rasterio is a library to open, write, explore and analyze georasters in Python. The library uses GeoTIFF images along with other formats and is capable to work with satellite images, digital elevation models, and drone generated imagery.

This tutorial show the complete procedure to analyse the NDVI from a Landsat 8 image with Python 3 and Rasterio. The scripting and representation was performed on a interactive enviroment called Jupyter Notebook, finally the result georaster was opened in QGIS and compared with some background images.

Read More

 

Suscribe to our online newsletter

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

 

Sentinel2 images exploration and processing with Python and Rasterio - Tutorial

Rasterio is a Python library that allows to read, inspect, visualize and write geospatial raster data. The library uses GeoTIFF and other spatial raster formats and is capable of working with satellite imagery, digital elevation models, and drone imagery data products. Rasterio allows you to import a single band or multiband geospatial raster in a interactive Python enviroment as Jupyter notebook, the library can keep the “duality” of the geospatial raster, that means, it can handle the location and resolution parameters as well as the matrix values of the gridded elements.

This tutorial shows some basic procedures to explore a multiband Sentinel 2 granule with Python 3 and Rasterio on a Jupyter Notebook. The tutorial shows the commands to identify the raster array dimensions and the geospatial referencing parameters, make representation of each visible band and export band composites as true color and false color geoespatial rasters in Tiff format.

Read More

 

Suscribe to our online newsletter

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

 

Elevation Model Conditioning and Stream Network Delimitation with Python and Pysheds - Tutorial

Digital elevation models (DEMs) from satellite interpretation (Aster DEM or Alos Palsar) come with “sinks” from errors in the elevation interpretation, raster resolution or reprojection. There is a need to correct those rasters in order to interpret the hydrological features. This tutorial show the process to condition a digital elevation model (DEM) dowloaded from a NASA/USGS server (gdex.cr.usgs.gov) with the Pysheds library of Python. The tutorial was done on a Jupyter Notebook, input files and scripts are attached on the final part of the post.

Read More

 

Suscribe to our online newsletter

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