Blog

Viewing posts for the category FOSSGIS

Generating an XYZ ASCII file from a QGIS raster

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 2 years, 9 months ago | Comments

Someone wrote to me asking if it would be possible to generate an XYZ ASCII file from a single band raster layer in QGIS. No doubt there are more efficient ways (this approach is pretty slow but it works), but I thought it would be fun to show how you can iterate over a raster, writing out the value of each cell into a text file (along with the centroid coordinates for that cell).

How to create a QGIS PDF report with a few lines of python

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 2 years, 9 months ago | Comments

Sometimes you want to automatically generate a report to reflect the latest state of your data. For example you may be capturing spatial data into a PostGIS database and want a snapshot of that every few hours expressed as a pdf report. This example shows you how you can quickly generate a pdf based on a QGIS project (.qgs file) and a QGIS template (.qpt file).

Alternatives to Google Maps Engine

Posted by: Gavin Fleming | in Boundless Suite, FOSSGIS, GeoServer, PostGIS | 2 years, 10 months ago | Comments

Google will be supporting Google Maps Engine (GME) for only one more year. If your company uses GME or was thinking about it, you'll need to consider alternatives. Kartoza offers various alternatives depending on your use case. We are BoundlessGeo partners and offer support for the OpenGeo Suite in southern Africa. For more details of the Google announcement, including various scenarios where you should consider the OpenGeo Suite, see BoundlessGeo's take on it.  Kartoza also offers development, support and training services across other components of the FOSS GIS stack that offer alternatives to Google and other proprietary products - we'd love to hear from you!

A quick hack to select all multipart features in QGIS

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 2 years, 11 months ago | Comments

Today we wanted to find all the multipart features in this layer:

Orchestrating GeoServer with Docker and Fig

Posted by: Gavin Fleming | in Docker, FOSSGIS, GeoServer, PostGIS | 2 years, 11 months ago | Comments

In this article I will detail how to set up a simple orchestrated system of docker containers using:

Setting up a Fedora 21 QGIS Workstation

Posted by: Gavin Fleming | in FOSSGIS, QGIS, Uncategorised | 2 years, 11 months ago | Comments

I have been a long time Ubuntu user (I have actually been using it since Ubuntu 4.10 'Warty Warthog') - the first official release. The advent of Ubuntu saw an end to my distro hopping whilst looking for the 'perfect linux distro'.

Playing with Foreign Data Wrappers in PostgreSQL

Posted by: Gavin Fleming | in Database, FOSSGIS | 3 years, 3 months ago | Comments

Recently I set out to try out the PostgreSQL foreign data wrapper (FDW) because I needed access to data that was in MySQL tables. The main reason I needed to play around was to expose my data to a range of PostgreSQL functions that are better and more recent that MySQL. I also needed to use MySQL data for views and lookups and data-driven styling for some Geoserver layers. FDWs allow remote access to tables or queries from various external third-party databases or file structures.

How to quickly transform a bounding box from one CRS to another using QGIS

Posted by: Gavin Fleming | in FOSSGIS, QGIS | 3 years, 4 months ago | Comments

Today I needed to convert a bounding box for a tilemill project that I want to bring into QGIS as a tile layer (more on that in a future post if I get it to work...).  I needed to convert a bounding box from EPSG:4326 ('Geographic') coordinates to EPSG:3857 (Spherical Mercator). Fortunately it is a fairly trivial process if you don't mind writing a few lines of python in the QGIS python console:

box = QgsRectangle(-19.6875,-37.9962,59.0625,37.4400)
source_crs = QgsCoordinateReferenceSystem(4326)
dest_crs = QgsCoordinateReferenceSystem(3857)
transform = QgsCoordinateTransform(source_crs, dest_crs)
new_box = transform.transformBoundingBox(box)
new_box.toString()
u'-2191602.4749925746582448,-4578889.0142234507948160 : 6574807.4249777207151055,4500615.8633687794208527'

 

Template by Blacktie Mezzanine theme by CodingHouse