A python scripts that counts superpositions of rectangular extents
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.




This is a python script that creates an ASC raster layer counting superpositions of rectangular extents defined by four coordinates. The input is a CSV with 4 columns for east, west, north and south coordinates of each extent.

Superposition of rectangles

The resulting ASC layer can be viewed in GIS software to produce this kind of maps :

Map example

You can then use asc_calculator to calculate differences between two asc files, to create an evolution map between 2 dates for example. This script was written by Sébastien Serre (https://github.com/ssbx).


This script is used to analyze Spatial Data Infrastructures for the GEOBS research project : https://www-iuem.univ-brest.fr/pops/projects/geobs.


How to run

This script uses a CSV file as an input, with each line corresponding to one rectangular extent, and 4 columns for the 4 coordinates of each extent (west, east, north, south). These 4 columns can be in any order and labeled as you wish. Open metadata_extents.py with a text editor and set the variables at the beginning of the script :

  • resolution (same unit as coordinates used in CSV, i.e degrees if coordinates in WGS84)
  • path to CSV
  • delimiter of CSV
  • quotechar of CSV
  • names of CSV columns
  • name of output raster which will be created
  • name of log file

Once you've set these variables, run the script (http://pythoncentral.io/execute-python-script-file-shell/).


This project is published under the General Public License v3.