Category Archives: coding

Wilderness 3d: The Canary Islands wilderness

Wilderness on Lanzarote, Canary Islands, Spain.

Wilderness on Lanzarote, Canary Islands, Spain.

Like many other Europeans I have had my share of visits to the Canary Islands (three and counting). The climate is decent from February until November. Some even like it in December and January. Most of us go to the Canary Islands for sunbathing, for long walks, to swim, spend time with friends or just get away from it all.

Few, if any, go to the Canary Islands for the wilderness. In this article I will be looking at your options if you were interested in getting away from people in the Canary Islands. It is not easy, but it is possible. If you are looking for wilderness in the Canary Islands I would suggest going to Lanzarote. Parque National de Timanfaya is the easiest accessible wilderness area.

The above map is based on publicly available vector data from the OpenStreetMap-project covering the Canary Islands. A wilderness analysis based on insufficient data will only represent a map of more or less mapped areas. In this case the basis for the analysis is decent. There will still be many errors.

The analysis has not in any way been sanctioned by Spanish authorities. It will not be used by the authorities and the audience (GIS geeks) of this posting is anyway quite limited.

The criterias used to map the wilderness areas based on OpenStreetMap in the Canary Islands are as follows:

  • Roads: primary, secondary, tertiary, unclassified, motorway, trunk
  • Land use: industrial, reservoir, military, farmland, residential, orchard, commercial, quarry, farmland and salt_pond
  • Railways
  • Waterways: canal

Like it or not – the presented map is what you get.

Wilderness 4: Wilderness degradation analysis

Area with wilderness and encroachment. Visualization of change of wilderness status.

Area with wilderness and encroachment. Visualization of change of wilderness status.

Wilderness degradation happens when new encroachments are made changing the wilderness status of an area. It is a complex issue which does not easily lend it self to a GIS based analysis. I will refer to my posting on wilderness for a peek into the complex world of wilderness philosophy.

It is possible to set up a system like FME to do an analysis of changes in wilderness due to new encroachments. The procedure I made generates a wilderness degradation data set based on wilderness and (new) encroachment data. It is based on procedures used by the Norwegian government in their analysis of wilderness and encroachment. The system should however be easy to accommodate for different preconditions by manipulating the number of wilderness zones and/or their buffer distances.

To visualize the degradation of wilderness it is necessary to make a categorization and furthermore establish a cartography to carry the information to the reader. In my view this can not be done unless the author/mapmaker to some extent takes side in what is good or not good related to wilderness degradation. This will be the focus on a forthcoming posting, but I will touch into the issues here as well.

FME is but one of the potential solutions for producing the results. QGISGeoKettle and even PostGIS could be good alternatives. The GitHub project has room for alternative implementations.

Continue reading

Wilderness 3b: The Guinea analysis

The map in this posting is the results of a calculation of wilderness based on methods discussed earlier in this series using OpenStreetMap data for Guinea.

One of the reasons why I choose Guinea for a wilderness analysis is that I do not know the country. I have not worked with anyone in the conservation scene in Guinea. I barely know the geography of the country. Guinea did however seem to have a decent OSM coverage. It has also had a lot of focus lately due to the ebola virus.  Continue reading

Wilderness 2: A practical approach to wilderness analysis using FME

Psalter World Map ca 1265

Psalter World Map ca 1265

In a former posting I discussed how wilderness is not only about politics, religion, philosophy and legal instruments. Unless we force it into a practical context, the term “wilderness” remains an intangible size. Geographers have a long history for making representations of the intangible – be it disease (John Snow), social justice and injustice, demography and more. To my knowledge one of the first impressions of wilderness or “the wild” is what we can find in some older maps. “Hic sunt dracones” (here be dragons) is an expression which can be found on the “Hunt-Lenox Globe” (c. 1503–07). Other maps bear similar indications of uncharted or remote areas. We, the geographers, have moved on. Today we paint our dragons in more sophisticated ways.

The use of technology to “find” or delimit wilderness has a long history in Norway and other countries. I will continue this tradition and do an analysis which in many ways is similar to those done in Norway. The encroachment types will be slightly different. So will the technology used to do the analysis.

In this posting I will look at how FME can be used to establish a wilderness areas data set. The results will be presented in a separate posting.

Continue reading

QDGC-files updated

qdgc_logoThe Quarter Degree Grid Cells (QDGC) data set has been updated. It is well over a year since last time. Some errors in the current release has made this necessary.

One of the things which kept me from doing the update was the rather complicated python-scripts combined with using the arcpy-library. The whole process was in it self complex. I dreaded sticking my head down into the python/arcpy/manual processing soup.

Through the last year or so I have started using FME more and more. Once you know a tool well you start thinking – what if… So I thought – what  if I instead of going one more round with python and arcpy tried solving this challenge using FME? Continue reading

Converting shapefiles to Mission Planner .poly-files

15-9-plannedMission Planner by Michael Oborne is an impressive piece of software. It is used to program the open-source APM autopilot. The autopilot is used to control planes, copters and rovers. I have used Mission Planner a lot and I can not do without.

Some years ago I started making a map for the Mindland island in the archipelago of Norway using a GPS, OpenStreetMap and Bing aerial imagery. The main driver for this project was to document old place names. With the drones becoming somewhat of a hobby last year I thought it would be nice to also establish a proper open license ortophoto for the island. Mission planner has what it takes to approach such a task in a structured manner, save for one thing. The polygon tool only imports .poly-files.

When working with maps some of us tend to stick with shapefiles or geodatabases. I have made a small script which allows for the conversion of a shapefile with a geographic coordinate system (wgs84) to as many .poly files as there are objects in the shapefile. Adding the functionality to Mission Planner has been indicated as possible, but has yet to materialise. So until then the script associated with this posting remains relevant. Continue reading

QDGC shapefiles available for national and continental scale distribution

Aqdgc_logo new set of the Quarter Degree Grid Cell shapefiles has been generated. The update is global and delivers an error fix for the country level files as well as a new product – continent level files.

The QDGC shapefiles contain center lon/lat coordinates and the QDGC string for the different squares. The files are offered down to level four. For a country around the equator level four covers around 45 square kilometers with length and height a little under seven kilometres.

Read more about the use of QDGC on this page:

The calculations/export  this time took around 60 hours computer pricessing time including generation of world fishnet with the different sizes, square area calculations, assigning QDGC strings, compression and more. Continue reading

Integrating the OGC WMS getcapabilities information in WordPress (iframe)

wms_tools_codeOver the last two years I have worked with WordPress as a content management system for several projects. WordPress has proved to be a flexible platform for publishing documents, files in general, imagery and maps. There was one thing missing though. I wanted to be able to list map layers available on a given wms-server.

To solve this I have now made a small php-script which allows the user to integrate server capabilities information from a geoserver based WMS-server. The code is a work in progress and does admittedly have some shortcomings.

The feature would not be possible without wms-parser.php and Openlayers. Continue reading

American mink – alien species proliferation analysis

Procedure overview for the analysis

Procedure overview for the analysis

The aim of this posting is to document the more technical aspects of establishing the knowledge basis necessary to follow up the action plan against american mink (nevison vison) – an alien species in the Norwegian fauna. It will show how the Python programming language and relevant programming libraries (ArcPy and others) are used in an analysis aiming to understand where the mink can spread under given circumstances.

The motivation for this is to document the process for other relevant projects as well as to make relevant code and methodological descriptions available for other persons/institutions involved in similar projects. The work has been made possible with access to other freely available information online and as such this posting should be considered a timely way of paying back for “services provided”. Continue reading

Solving the ESRI arcpy dissolve challenge

ready_for_dissolveIn a recent project at work I did an analysis on the spread of an alien species in Norway using ESRI ArcGIS 10.1 SP1. In this particular analysis we assumed that the species could swim a certain number of meters in open sea. How would it spread and to what extent would current protected areas be invaded by this overseas stranger to our environment? The density of islands Norwegian archipelago is massive, so the possibility for the alien species to spread is rather overwhelming.

As part of the analysis I ended up doing buffers around islands in the Norwegian archipelago. After which it would be necessary to merge and dissolve the objects. This turned out to be problematic. But for some of the shapefiles I was working with ArcGIS (arcpy and python) simply failed to complete the dissolve operation.

After contacting our local ESRI representative, Geodata AS in Norway, they concluded that this was related to the following error in ArcGIS 10.1: NIM079373: Running a large number of features through the Dissolve or Buffer with dissolve option, hangs during process. I have not found any publicly information with this reference.

One could say that 7283 polygons is a tall order. One could perhaps also say that working with polygons in a task like this rather than with raster is asking for problems. Given enough time I will look into it – later – in that quiet week when nothing else is going on at work, sometime.

This blog post is about but  how I came to understand more about the limitations and possibilities with the ESRI arcpy Dissolve_management tool. It is also explains how I found a rather surprising way to make it faster.

Continue reading