While there is the handy QGIS processing algorithm Download file, often publicly availabe (geo-)data are compressed in a ZIP archive. That's why I've started to develop a "Unzip Archive" processing algorithm for use in the QGIS processing toolbox. Thanks to the already available class QgsZipUtils it was not that difficult.
Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts
Sunday, December 18, 2022
Tuesday, December 22, 2020
Cloudless Atlas Laos 2020
To track down new hydro power reservoir and schemes I've downloaded most 2020 Landsat 8 scenes of northern Laos and applied my cloudless script.
![]() | |
| Northern Laos |
Sunday, November 29, 2015
Raster math in GRASS GIS using numpy
Houay Lamphan Gnai, yet another hydropower plant just started commercial operations recently
with a reservoir area of seven square kilometers as reported by local media. Time to put it
on OpenStreetMap using up-to-date Landsat 8 imagery and the new
GRASS GIS 7 plugin for
QGIS 2.12. To get familiar with GRASS GIS'
interface to numpy,
I've decided to extract the reservoir using numpy.
![]() |
| Houay Lamphan Gnai on Landsat 8 image taken on the 23rd Oct, 2015 |
Labels:
GRASS GIS,
Landsat,
OpenStreetMap,
Python,
QGIS
Thursday, August 14, 2014
Web Map Service with PyCairo and Pyramid
From time to time I have the chance to work with PyCairo, the Python bindings to the cairo graphic library. I appreciate this library because it allows to draw graphics primitives so super fast and thus it is very suitable to use it in web projects.
After my trials with GRASS GIS as WMS backend I thought I could create a raster web map service with improved performance by using PyCairo instead of GRASS GIS as renderer.
After my trials with GRASS GIS as WMS backend I thought I could create a raster web map service with improved performance by using PyCairo instead of GRASS GIS as renderer.
![]() |
| Zoom in - it is a super fast WMS! |
Tuesday, July 22, 2014
Imitating MapBox' Cloudless Atlas
Inspired by several posts which explain MapBox' marvellous Cloudless Atlas, I wanted to imitate a cloudless atlas by myself. Limited in time and computer power I had to do it much simpler of course. But using first class spatial Python libraries I could achieve quite nice results with a simple Python script.
![]() |
| The result: a cloudless Landsat 8 scene |
Thursday, December 19, 2013
GRASS GIS Web Map Service with Pyramid
Lately I explored the capabilities of the Python bindings in GRASS GIS. Since I'm quite familiar with Python web frameworks it was an easy task to wrap the d.mon module and create a Web Map Service based on a GRASS location.
Here I'll show how I implemented the WMS using the Pyramid framework in a single file.
Here I'll show how I implemented the WMS using the Pyramid framework in a single file.
Labels:
GRASS GIS,
Pyramid,
Python,
Web Map Service
Wednesday, November 7, 2012
Heat maps with Python
Heat maps are a quite often discussed topic on gis.stackexchange.com, probably because they are easy to understand and very appealing when showing spatial distributions of features. Working with a Python web framework, I looked for a Python way to create heat maps. Finally I came up with a script that uses OGR to read an input Shapefile and matplotlib to do the actual work.
Labels:
Heatmap,
matplotlib,
OGR,
Python
Wednesday, April 18, 2012
Native SLD support in QGIS
The current Quantum GIS master (i.e. the latest development version) supports now loading and saving of Styled Layer Descriptor (SLD) styles in the layer properties dialog.
The QGIS API has been extended by the new methods saveSldStyle and loadSldStyle in QgsMapLayer and writeSld and loadSld in QgsVectorLayer. Currently these methods are not yet available in the Python API, but it is simple to add them in the corresponding SIP files.
The QGIS API has been extended by the new methods saveSldStyle and loadSldStyle in QgsMapLayer and writeSld and loadSld in QgsVectorLayer. Currently these methods are not yet available in the Python API, but it is simple to add them in the corresponding SIP files.
Wednesday, April 4, 2012
Line extraction with GRASS GIS
This post presents another way how to use Landsat imagery to map features for OpenStreetMap in an easy way with free and open source software only. After remapping the Nam Ngum 1, Nam Leuk reservoir and other lakes using a similar approach, I wanted to improve the Nam Ngum river. The second largest river in Laos and an important tributary to the Mekong was in OpenStreetMap only mapped as a single line instead of an area, although it's more than hundred metre wide downstream of the Nam Ngum 1 reservoir.
Labels:
GRASS GIS,
Landsat,
OpenStreetMap,
Python
Thursday, October 13, 2011
Save As SLD 0.3.0 released
When I developed the Save As SLD QGIS plugin some months ago, I did it for my own purpose to publish simple choropleth maps with GeoServer and I implemented solely renderers and styling options I needed (and a little bit more). That's the reason why this plugin still lacks a lot of features.
Thursday, July 28, 2011
Improved Polygon Capturing 1.0 is released
I'm pleased to announce version 1.0 of the Improved Polygon Capturing plugin for QGIS!
Until now I didn't want to give version 1.0 to this plugin since one important feature was still missing: After digitizing a new geometry the feature form was not opened like it is the usual behavior of the standard editing tools. But today I discovered very coincidentally the openFeatureForm method in the QgisInterface class. It wasn't a big deal to integrate it and now the feature form is opened and the plugin gets to version 1.0.
Feedback is highly appreciated!
From the help file (last update 8.8.2011):
Improved Polygon Capturing is a QGIS Python plugin, that allows to digitize new polygons or lines with predefined edge lengths. Point layers are not handled.
The plugin is available in the QGIS contributed repository. Please see the official QGIS manuals to get further information about plugin repositories.
Select a polygon or a line layer and toggle editing. After setting the first vertex the next vertices are added in the direction of the mouse pointer with the predefined length set in the spin box. Similar to the standard editing tools left mouse clicks add a new vertex while right mouse clicks finish the geometry.
After finishing a new geometry the feature form opens and attributes can be entered.
While digitizing new vertices the snapping properties from the current project settings are considered as well as the avoiding intersection properties.
If the distance in the spin box is set to 0 (zero), new vertices are set at the mouse position.
Until now I didn't want to give version 1.0 to this plugin since one important feature was still missing: After digitizing a new geometry the feature form was not opened like it is the usual behavior of the standard editing tools. But today I discovered very coincidentally the openFeatureForm method in the QgisInterface class. It wasn't a big deal to integrate it and now the feature form is opened and the plugin gets to version 1.0.
Feedback is highly appreciated!
From the help file (last update 8.8.2011):
Improved Polygon Capturing is a QGIS Python plugin, that allows to digitize new polygons or lines with predefined edge lengths. Point layers are not handled.
The plugin is available in the QGIS contributed repository. Please see the official QGIS manuals to get further information about plugin repositories.
How to use
The plugin adds a new icon and a spin box to the digitizing toolbar. The icons are derived from the gis icon theme and look as follows:| Editing a polygon layer: | Editing a line layer: |
| The digitizing toolbar with added plugin: | |
After finishing a new geometry the feature form opens and attributes can be entered.
If the distance in the spin box is set to 0 (zero), new vertices are set at the mouse position.
Caveats
The plugin calculates the distance in plain trigonometry. Thus it is not recommended to use it in unprojected systems like EPSG:4326.History
Improved polygon capturing plugin has been developed in June 2010 for a land management and registration project in the Lao PDR. It is used to digitize land parcels with known edge lengths from high-resolution satellite images. The parcel edges have been measured a priori in the field.- Version 0.8 (June 2010): first published version
- Version 0.9 (February 2011): added support for polyline layers
and bug fixing - Version 1.0 (July 2011): feature form opens in editing
mode after finishing a new feature - Version 1.0.1 (August 2011): plugin gets an icon in the plugin manager and rubber band line width and color settings are considered
Subscribe to:
Posts (Atom)






