Thinking in GIS

a blog about GIS from a urban geogeek working for humanitarian emergencies

Feed, Categories, Archives


The PostGIS cookbook is here!

Posted: January 24, 2014
Categories: python, PostgreSQL, GIS, PostGIS
Feedback: View Comments

After 18 months of hard work in our spare time, the PostGIS cookbook has been finally published!The book, in a friendly tutorial fashion, covers a plethora of PostGIS related topics such as:Importing and exporting dataVectorial and Raster management and analysis functionsUsing desktop clients such as QGIS, OpenJump, gvSIG and UDigpgRouting and how to use the Nth dimensionwriting PostGIS programs with Pythonusing PostGIS to do web GIS with web mapping engines and frameworks such as MapServer, GeoServer, OpenLayers, Leaflet and GeoDjangomaintenance, optimization and performance tuningThanks to the other authors - Steve, Bborie and Thomas - for the huge effort done in...
Read the full post

The power of GDAL virtual formats

Posted: March 08, 2012
Categories: python, qgis, mapserver, GIS, GDAL
Feedback: View Comments

GDAL is most likely the most powerfull GIS toolset out there, with very geekish features that may seem complicated at first, but become extremely powerful and simple at the same time once you master them. One of these features I most like is the virtual format concept, valid both for raster data sources (GDAL) and for vectorial data sources (OGR).Basically GDAL gives to the user a very simple mechanism to create virtual formats from some different sources.Let's analyze this feature, with a couple of samples derived from real world scenarios I have been envolved in the last weeks.GDAL gives the...
Read the full post

Python for geospatial developers

Posted: February 03, 2012
Categories: geodjango, GIS, shapely, python, owslib, pyproj, qgis, mapserver, mapnik, fiona, geopy, GDAL
Feedback: View Comments

There is a recurring question at GIS mailing lists, forum and at some extent in my mailbox: what is the best way to master Python for developing geospatial applications?I myself had this question far away in 2006 when I started switching from proprietarysoftware to Open Source, and had identified in Python the way to go.In this post I will try to quickly summarize what is the best way to go in my opinion.If you are completely new to Python, first things to check out, are some very basic and popular resources, like these ones:the official Python tutorialthe "Dive into Python...
Read the full post

Playing with the Esri File Geodatabase and the Google Fusion Tables GDAL drivers

Posted: January 10, 2012
Categories: GIS, GFT, GDAL
Feedback: View Comments

Today in the GDAL mailing list Frank Warmerdam has announced that GDAL 1.9.0 has finally been released.Being a major new release, it offers many new features, but what I was waiting for is the support for Esri File GDB and Google Fusion Table.So I couldn't resist to install it and giving a try.For using the File Geodatabase driver I had to dowload the Esri File Geodatabase API (you need to be registered for downloading it).It was then just a matter of setting the value of the library path in the LD_LIBRARY_PATH variable, and using the --with-fgdb GDAL configuration option when...
Read the full post

Managing documentation's translations with Open Source tools

Posted: January 05, 2012
Categories: Sphinx, GIS, po4a, reST
Feedback: View Comments

Today together with Paolo Cavallini, I have been trying to figure out a workflow for managing documentation's translations for QGIS.There are many tools for managing documentation workflows out there: a common approach to which I have been exposed by following both the Python and the OSGeo communities is to keep the documentation source files in the reStructured Text markup format, and to generate the end user documentation with tools like docutils and Sphinx to a bunch of different formats (i.e. html, odt, pdf, latex... just to name a few).Python documentation itself and two wide spread GIS projects like MapServer and...
Read the full post

PostGIS in action

Posted: April 25, 2011
Categories: books, GIS, Postgres, PostGIS
Feedback: View Comments

PostGIS in action has landed: finally a book about PostGIS, we were all missing it!A software project that has a public visibility since almost 10 years, with a large community and a long series of use cases, finally has its deserved book.I started using PostGIS in 2006 in a situation where the company I were working for at that time had to cut the cost of licenses and maintenance. Opting for FOSS gave us also the possibility to eliminate long administrative times needed to change any of the requirements in the licenses.But above all, we knew to select a technology...
Read the full post

A quick look at the WFS GDAL Driver

Posted: March 23, 2011
Categories: Python, WFS, GIS, GDAL, OGR
Feedback: View Comments

If you have ever tried to interact with a WFS (via a browser, or curl, or OpenLayers or whatever), you are fully aware that it has alway been a pain to interact with, and until now the only Python library that made life simpler was the excellent OWSlib by Sean Gillies (that, BTW, will deserve itself another post at this blog in the next weeks).But since some weeks, from the release of the GDAL version 1.8.0, a new toolset is available to GIS users and developers via the new included GDAL WFS Driver (that will now make good company to...
Read the full post

Compiling GDAL with Oracle Spatial support

Posted: March 22, 2011
Categories: Oracle Spatial, GeoDjango, GIS, GDAL
Feedback: View Comments

These are my quick notes for installing Oracle Instant Client on a Linux box (currently I have tested this on a Ubuntu 10.10 64 bit box and with Oracle 11.2 and GDAL 1.8.0), and then configuring GDAL for using Oracle (OCI and GeoRaster drivers support).Finally I will show how to configure GeoDjango to use an Oracle spatial database by using the Cx_Oracle Python library.First download Oracle Client files from here or here if you are on a 64 bit architecture.You need to download the following 3 zip archives:~/software/oracle$ lsinstantclient-basic-linux-x86-64-11.2.0.2.0.zip instantclient-sdk-linux-x86-64-11.2.0.2.0.zip instantclient-sqlplus-linux-x86-64-11.2.0.2.0.zipThen extract the archives to a location...
Read the full post

Why I have moved my blog to Blogofile

Posted: March 09, 2011
Categories: Python, blogofile, GIS
Feedback: View Comments

So, after five years of blogging I have sent my Wordpress blog to pension and I have moved my blog to Blogofile.You may wonder why I have moved my blog from a spread and fully featured platform to an almost unknown exotic one.Basically I wanted to have the following advantages:Python framework, with the possibility to write in this language plugins and extensionsability to write my blog posts offline, in a markup format like REST or Markdown, with viblog system able to generate static content from the posts written in the markup language, in a Sphinx fashion, without the overhead of...
Read the full post

After the GFOSS Day 2010, the Italian FOSS4G event

Posted: November 29, 2010
Categories: GIS, Shapely, conferences, Python, GeoAlchemy, GeoDjango, GDAL, Uncategorized
Feedback: View Comments

Last week I have been attending the GFOSS Day 2010 in Foligno, basically the FOSS4G Italian Event that is held every year.The conference was split in two days: in the first days a good number of workshop and tutorials were given, related to a number of geospatial technologies.In the second day there were the instutional talks, mostly related on the open data theme.This year I myself gave two talks at the conference: in the first day, togheter with Alessandro Pasotti, we have been giving an extended tutorial about developing geospatial software with Python, here are the slides:Developing Geospatial software with...
Read the full post

Geocoding in web applications: OpenLayers and geoPy to the rescue!

Posted: September 17, 2010
Categories: jQuery, GIS, Python, Django, OpenLayers, Tutorials, geopy, Uncategorized
Feedback: View Comments

In many situations, in your web applications, you will need a feature for geocoding an address, a city, a country...A possible approach is to use the Javascript API of the main geocoding services (Google Maps, Yahoo! Maps, GeoNames...).But as I have showed in a previous post, if you are using Python, there is an excellent API that will take care of this, without Javascript headaches: GeoPy.In this post I will show how to use geoPy, OpenLayers and a bit of JQuery to assemble a simple but nice tool for geocoding within OpenLayers.In my server code I will use Django but...
Read the full post

FOSS4G 2010 in Barcelona

Posted: September 11, 2010
Categories: GIS, conferences, Uncategorized
Feedback: View Comments

This year I was enough lucky to have the possibility to attend at the FOSS4G World conference in Barcelona (thanks to my company for having send me there!) - that has been run just this week, as many of you may already know.I just came back home yesterday night and until my impression are still very clear, I were thinking it is a good idea to post them here.The conference, as you may know, is held every year and is organized by OSGeo. They try to organize it every year in a different continent, and this year was the time...
Read the full post

The unity of all the sciences is found in Geography

Posted: February 02, 2010
Categories: GIS, Uncategorized
Feedback: View Comments

In Italy, recently, a new law is being discussed and if approved it will substantially reduce the hours Geography is taught in schools.My blog, together with other Italian mayor GIS related blogs, is going to support this petition by AIIG, Associazione Italiana Insegnanti Geografia (Geographic Teachers Italian Association):SCHOOLS WITHOUT GEOGRAPHYDoing geography at school means educating citizens of Italy and the world to be aware, independent, critical and responsible, to know how to live their lives within their environment, and how to change it in a creative and sustainable way, with an eye to the future.In the new curricula...
Read the full post

Using MongoDb to store geographic data

Posted: December 06, 2009
Categories: GIS, NoSQL, Python, MongoDb, devs, GDAL, Uncategorized
Feedback: View Comments

In the last months there has been a plenty of activity in the non relational (NoSQL) database world.NoSQL database tries to solve 3 main RDBMS problems:Scalability, for example the ability to automatically partitioning data across multiple machinesPerformance, in some case RDBMS can be very slowFixed schema: RDBMS have nice goodness (referential integrity, relationships, triggers...) but force you to store any object to a fixed schema (migrations are a pain!)Basically there are several different kinds of NoSQL database:Key/Value (Scalaris, Tokio Cabinet, Voldemort): store data in key/value pairs: very efficient for performance and higly scalable, but difficult to query and to implement...
Read the full post

Geocoding with GeoPy

Posted: October 14, 2009
Categories: google, GIS, geonames, Python, yahoo, devs, geopy, Uncategorized
Feedback: View Comments

There are now may geocoding web services out there, like Google geocoder, Yahoo geocoder, geocoder.us (only for US address), Microsoft MapPoint, GeoNames and MediaWiki.Normally you may access this web services API directly with HTTP REST request, and get a response in common formats like , JSON, KML.For example you may geocode with the Google geocoder an address like this one: "1071 5th Avenue, New York, NY" with a request like this one:http://maps.google.com/maps/geo?q=1071+5th+Avenue,+New+York,+NY&output=json&oe=utf8&sensor=true_or_false=&key=your_apy_keyIn this case we are querying the Google geocoder web service to get a response in json via the output parameter in the query string. This is the...
Read the full post

A day with TileCache: generating KML Super-Overlays

Posted: August 06, 2008
Categories: TMS, GIS, SharpMap, WMS, Python, MetaCarta, kml, FeatureServer, devs, Apache, MapServer, TileCache, OpenLayers, GeoServer, Tutorials, GDAL, Uncategorized
Feedback: View Comments

My friend Diego Guidi is the smartest GIS/.NET developer I personally know here in Italy. He is the developer of NetTopologySuite, the port in the .NET world of the popular Java's JTS Topology Suite from VIVID Solutions. I wanted, sooner or later, write some stuff here about WMS and TMS, and now I am very happy that Diego asked me to publish this brilliant article about this topic.First of all, let me thanks Paolo for hosting this post! I hope that this article can be interesting and useful like other stuff that you can find here...IntroductionThere are a lot of...
Read the full post

Spatial Database for Postgres and ArcGis users: how to choose

Posted: June 06, 2008
Categories: GeoServer, GIS, ArcIMS, QGIS, FeatureServer, uDig, ArcObjects, PostGIS, gvSIG, ArcGis Desktop, ZigGis, ArcSde
Feedback: View Comments

As many of you can have already read, ArcSDE for Postgres is coming out at ArcGIS 9.3 (it is currently in the release candidate state). It will let you store geometries in two formats, Esri geometry and PostGIS geometry, in the same fashion ArcSde for Oracle is letting Esri or Oracle geometries be stored. I have seen some interest in the GIS community about this new, and i was reading interesting posts by Bill Dollins, Paul Ramsey, James Fee and Dave Bouwman, so I thought i would post here my opinion. Plus, as some of you may already know, zigGis...
Read the full post

A day with FeatureServer #2

Posted: May 03, 2008
Categories: OpenStreetMap, Web2.0, GIS, WMS, Windows, Twitter, PostGIS, devs, Python, OpenLayers, FeatureServer, Ubuntu, WFS, Flickr, Uncategorized
Feedback: View Comments

In the previous post we have seen an introduction to FeatureServer, and we were just playing with the base edit sample, with the scribble layer.Now it is time to use FeatureServer with our datasets: I am assuming that you will want to create FeatureServer services for shapefiles, PostGIS layers, OpenStreetMap, Twitter and Flickr.Data preparation for this demo1) shapefilesIf you want to follow my steps, you can download the sample shapefiles of New York I was using to assemble this demo here: select New York as a state and then as a county, and download the Block Groups and the Roads,...
Read the full post

Do you get errors in the mapscript c# tutorial?...

Posted: February 29, 2008
Categories: GIS, Windows, .NET, PostGIS, devs, MapServer, Tutorials
Feedback: View Comments

...well, this is the solution to your problems (at least I hope so).I am continuing receiving emails from people in despair that cannot successfully use this tutorial. I am sorry but I cannot answer to all this emails, so I thought to write this post in order to allow people to configure it correctly.BTW, this demo is still working since 2 years without any problems, and the code there is just the same you can download from this blog. So it must work also for you ;-)So if you just cannot use it, this is a check list:If you receive...
Read the full post

A day with FeatureServer #1

Posted: February 21, 2008
Categories: Python, GIS, gvSIG, WMS, Windows, uDig, PostGIS, devs, QGIS, FeatureServer, Ubuntu, Apache, WFS
Feedback: View Comments

Some friends already spoke me well about FeatureServer by Metacarta in the last weeks, so I already was waiting for having a bit of time to get started with it. Then James posted this on his blog, and my curiosity was definitely fired.So I decided to spend a day for installing and testing it, without thinking of the lack of documentation (FeatureServer is still a young project, so no wonder here if the only way to get infos is digging in the source code and posting to the mailing list). The day I considered to spend on it then spawned...
Read the full post

Installing PostGIS on Ubuntu

Posted: January 30, 2008
Categories: GIS, gvSIG, QGIS, uDig, PostGIS, devs, Ubuntu
Feedback: View Comments

With this post I will show how to install PostGIS 1.2.1 on Postgres 8.2.5 in Ubuntu 7.10 (but this procedure should work also for previous PostGIS/Postgres/Ubuntu versions) from repositories.I will also show you how to load and secure GIS data and how to access them with some cool OS GIS Client (QGIS, UDig and gvSIG).If you use this instructions together with my previous post, you will have a fully functional GIS Server Open Source Ubuntu workstation!-1- Install PostgresIf you haven't Postgres, you need to install it (PostGIS runs on top of it). Open an Ubuntu terminal, and type:sudo apt-get install...
Read the full post

Installing MapServer on Ubuntu

Posted: January 10, 2008
Categories: GIS, devs, MapServer, Ubuntu, Apache, Uncategorized
Feedback: View Comments

With this post I will show hot to install MapServer 4.10.3 in Ubuntu 7.10 (but this procedure should work also for previous Ubuntu versions) from repositories.1) set Ubuntu sources needed for this softwareAdd universe ( http://archive.Ubuntu.com/gutsy/universe ) and multiverse repositories to your sources (by default are not in Ubuntu)sudo gedit /etc/apt/sources.listand uncomment this two lines:deb http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiversedeb-src http://archive.ubuntu.com/ubuntu/ gutsy-security main restricted universe multiversesave the sources.list file and then then update your sources:sudo apt-get update2) Install MapServernow download and install MapServer:sudo apt-get install cgi-mapserver mapserver-bin mapserver-doc php5-mapscript python-mapscriptMapServer 4.10.3 will be installed (latest of MapServer 4.x serie,...
Read the full post

zigGis 1.2 released

Posted: March 21, 2007
Categories: ArcGis Desktop, ZigGis, GIS, PostGIS
Feedback: View Comments

zigGIS 1.2, the Open Source ArcGIS Desktop's connector to PostGIS, has just been released and you can download it here.This is a major release, as far it implements new important features like selections and rendering. At this time editing is still not supported (so it is still a read only connector).Also ArcMap documents persistence is now fully supported, meaning that you can save your mxd document with your PostGIS layer in them, and then open them again without problems.zigGIS should correctly work with ArcGis 9.0 (sp3), 9.1 and 9.2. Before installing it don't forget to install .NET support for ArcGis.Here...
Read the full post

PostGis WorkspaceFactory

Posted: February 21, 2007
Categories: GIS, .NET, ArcObjects, devs, PostGIS, ArcGis Desktop, ZigGis, COM
Feedback: View Comments

In my previous post I have showed you how to install and using zigGIS for adding PostGIS data into ArcMap.From the ArcMap user interface you just need to press the zigGIS button and an "Add PostGIS data" dialog will be shown to you. From there you can set a zig File path, where PostGIS connections settings are stored, and then a PostGIS layers list will be shown and you can check which layer(s) add to the map.In this post I will show how to programmatically use zigGIS and ArcObjects to add PostGIS data into ArcMap.zigGIS is a Microsoft .NET 2.0...
Read the full post

Installing zigGIS 1.1 for connecting ArcMap to PostGIS layers

Posted: February 14, 2007
Categories: GIS, .NET, ArcObjects, devs, PostGIS, ArcGis Desktop, ZigGis, COM
Feedback: View Comments

zigGIS is an Open Source PostGIS connector for ArcGIS Desktop, that enables ArcMap to add PostGIS layers in the map.Differently from other kinds of connectors, like for example PgArc, the very nice feature of zigGIS is the direct-read of PostGIS data, without the needs of proxy shapefiles. This meaning that the PostGIS features are directly readed and displayed in ArcMap from the PostGIS data source without a previous conversion to a Shapefile or personal GDB.This is a very interesting project, but still in a very early phase, in fact there are still important issues that are planned to be solved...
Read the full post

Next Page ยป