new GRASS extension: spatial pattern analysis

new GRASS extension: spatial pattern analysis

The r.pi GRASS extension is now published and available through the GRASS extension repository. It provides a range of functionality and allows to easily analyze spatial patch attributes in GRASS. Patches are expected to be raster objects derived from remote sensing data and their spatial characteristics is written into a new spatial file for further analysis.

The list of functions outlined in our recent publication in MEE can be seen here. More functions are available in the r.pi package but not specifically mentioned.

EAGLE students back to their second semester

EAGLE students back to their second semester

After the semester holidays, we welcome our EAGLE students back to their second semester!

Some of them already took the chance to take part in a short course on landscape ecology for wetland monitoring and management with QGIS given by the ERASMUS lecturer Dr. Aurelie Davranche (more) the last two days.
Today, the course   “Advanced spatial analysis for geoscientists – object-oriented image analysis” started. It is a hands-on-data-seminar jointly given by our colleagues Dr. Michael Thiel, who will teach eCognition during the summer term, and Dr. Christian Geiss who will be at our department until the end of the week. Christian is an invited guest lecturer from DLR’s Remote Sensing Data Center (Department: Geo-Risks and Civil Security) and he is working on mapping and characterization of urban areas with respect to risk and vulnerability assessment. If you want to learn more about Christian’s Team click here.

We wish all students and lecturers interesting seminars (full list) and a successfull summer term!

CODE-DE – Satellite data free of charge for everyone

CODE-DE – Satellite data free of charge for everyone

Our colleagues at DLR released a platform which allows easy and free of charge access to Sentinel remote sensing data:

CODE-DE makes possible free-of-charge, simple access to data from the Sentinel satellites and to information products from the European Copernicus programme–including an up-to-date cloud-free mosaic of Germany, produced at EOC. The platform will also provide access to national geodata infrastructure (GDI-DE). This portal provides harmonised and standardised German geodata from a wide variety of sources. By agreement with industrial partners it is also planned to offer data from the German radar satellites TerraSAR-X and TanDEM-X as well as high-resolution optical images from RapidEye satellites.

CODE-DE offers a one-stop shop. The data is collected in a single portal so that users no longer have to search through various databases, as formerly. This gives them direct access to an enormous amount of data—the Sentinel satellites alone will produce a data volume of some 50 petabytes by the end of 2020.

 

read more: http://www.dlr.de/eoc/en/desktopdefault.aspx/tabid-11932/20674_read-48811/

 

 

 

Extracting the central strip from LANDSAT 7 imagery

Here is a simple Python code to extract the central strip from Landsat 7 imagery (SLC-off),  that is not affected by the SLC failure. The algorithm shrinks the striping zones through a morphological filter (erosion) and creates a new shapefile AOI that extracts the desired raster extent without striping effects. The code is based on Python for ArcGIS (arcpy) – so you require a ArcGIS license.

General steps:

  1. Loop through all Landsat 7 data folders
  2. Stack bands for each image
  3. Create a mask
  4. Erode the mask by 20 pixels
  5. Convert the mask to polygon
  6. Create a minimum bounding box
  7. Clip the original raster through the bbox

 

 

Remote Sensing and GIS for Ecologists book now available

Remote Sensing and GIS for Ecologists book now available

Our book “Remote Sensing and GIS for Ecologists – Using Open Source software” is now available. First editor copies arrived already and it looks pretty good. Great to have finally a copy on our desks after all the writing, testing and editing! We hope that you enjoy it as much as we do and that it helps you working with remote sensing and GIS in your research topics.

remote-sensing_gis_ecology_book_Wegmann_Leutner_Dech_2016You can order it here.

All practical examples in this book rely on OpenSource software and freely available data sets. Quantum GIS (QGIS) is introduced for basic GIS data handling, and in-depth spatial analytics and statistics are conducted with the software package R.

Readers will learn how to apply remote sensing within ecological research projects, how to approach spatial data sampling and how to interpret remote sensing derived products. We discuss a wide range of statistical analyses with regard to satellite data as well as specialised topics such as time-series analysis. Extended scripts on how to create professional looking maps and graphics are also provided.

This book is a valuable resource for students and scientists in the fields of conservation and ecology interested in learning how to get started in applying remote sensing in ecological research and conservation planning.

check the table of content here: http://book.ecosens.org/content/

Managing raster data with PostGIS and Python

Managing raster data with PostGIS and Python

PostGIS is the spatial extension of the open source database management system PostgreSQL. It helps you to manage your data (vector and raster) within a coherent geodatabase through a variety of spatial functions. Having a spatial database, the times of data clutter and messiness are over, especially when you are dealing with big data. Initially PostGIS was created to for the handling of vector data only. However, during the recent years more and more raster handling functionalities were introduced. For a complete overview of spatial raster operators, have a look at: http://postgis.net/docs/manual-2.1/RT_reference.html

 

Download and install PostgreSQL and PostGIS

Download PostgreSQL from here: http://www.postgresql.org/download/

The installer for PostgreSQL includes the PostgreSQL server, pgAdmin III; a GUI for managing and developing your databases, and StackBuilder; a package manager that can be used to download and install additional PostgreSQL applications and drivers. From the StackBuilder GUI, select Spatial Extensions and install the respective PostGIS 2.2 Bundle for PostgreSQL.

 

Create a new spatial database

In pgAdmin, create a new database (right click: New Database):

db

and the spatial extension postgis (right click on Extensions: New Extension):

pg

This will create a first table within your DB: spatial_ref_sys that contains the coordinate systems, map projections and the spatial indeces.

 

Set up Python

Python provides awesome functionality for the automated raster processing within PostGIS. Automatization is necessary especially when you deal with a lot of data and iterative processes. Python scripting is also needed as the pgAdmin GUI does not support the access of all functions.

Download Python 2.7 from here: https://www.python.org/downloads/

Psycopg2 is a Python library that accesses the objects of the PostgreSQL server and allows the execution of PostGIS commands from Python.

Download psycopg2 from here: http://www.stickpeople.com/projects/python/win-psycopg/2.6.1/psycopg2-2.6.1.win32-py2.7-pg9.4.4-release.exe

 

PostGIS scripting with Python

Import the Python libraries:

Set up input path and a loop that goes through all TIFs in the directory:

Connect to the PostgreSQL server:

Import each raster through raster2pgsql function (coordinate system epsg code is set to 32633 UTM):

Now run any PostGIS command you like. In this example we run rescale the raster to 250m spatial resolution and reproject it from UTM 33N to WGS84 (epsg code 4326). At the end, the raster may be exported locally to *.hex data format. The export is optional, we could also convert the raster to CSV or numpy array.