Thinking in GIS

a blog about GIS from a urban geogeek living at the countryside

Feed, Categories, Archives


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

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

The Pinax Tutorial #5: Adding a comment system

Posted: December 21, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

In this part we will improve the Bookstore application: what I am going to show is how easy it is to add support for enabling comments for a book without writing from scratch another comment system (as you may already now, avoid rewriting things is the core philosophy of Pinax and Django).Basically, you could add this feature by using one of these two approaches (there may be other ones, but these are the most common):Django comments frameworkthe django-threadedcomments system, that - as suggested by its name - it offers support for comments in a threaded fashionYou will implement a commenting...
Read the full post

The Pinax Tutorial #4: Using avatars, pagination and profiles

Posted: December 19, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

In this part we will improve the Bookstore application and we will see how easy it is to add support for three core features that any web 2.0 sites is supposed to offer:support for avatarssupport for paginationsupport for user profilesIn Pinax you may use two kind of avatars for your users (in both case you may manage them from the Avatar page: http://localhost:8000/avatar/change/):gravatarscustom avatarsIn the first case Pinax will render your avatar using the gravatar you have associated to your email from the Gravatar web service. In the latter Pinax will use a custom avatar you have uploaded to the...
Read the full post

The Pinax Tutorial #3: Internationalization of the application

Posted: December 18, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

(Note that, if you completed the other parts of this tutorial before the date of this post, you need to move the PROJECT_ROOT/templates/bookstore directory in PROJECT_ROOT/bookstore/templates: so now you will have a PROJECT_ROOT/bookstore/templates/bookstore directory. I did so for a better deployment experience, and doing so I am following the Django best practices. If you are reading the pdf version of the tutorial or the REST documentation, then this documentation is already updated with the templates directory in the right place).In this part of the tutorial I will show how easy it is to enable your application for internationalization with Pinax.Enabling...
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

The Pinax Tutorial #2: Developing the basic application and plugging it in Pinax

Posted: November 29, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

In this part of the tutorial you are going to create the core of the bookstore application, with all the pages that gives access to the CRUD (Create, Read, Update, Delete) features. And you are goint to plugin this basic application into Pinax.After finishing with this part you will have the core of the bookstore application working as desired. You will be able to:see a list with all the books in the bookstoreadd a new bookupdate and delete your bookssee a list of all books added by yousee a list of all books added by a userIn the following parts...
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

The Pinax Tutorial #1: Installing Pinax and making basic customisation

Posted: October 10, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

I will assume you are installing Pinax v0.7 on a Ubuntu 9.04 box, but this procedure - with a few modifications, should work well on every Linux box. For Windows please refer to the Pinax official site or - rather I highly reccomend to use VirtualBox, and to create an Ubuntu 9.04 Virtual Machine, so you will be able to follow step by step this tutorial.There are ready images like this one, to make things even easier.As suggested from the official installation procedure, the release bundle has everything you need for running Pinax.What is not included is:Python;Python Imaging Library (PIL);SQLite.Ubuntu...
Read the full post

The Pinax Tutorial, Introduction for Web Designers

Posted: October 03, 2009
Categories: Python, Django, devs, The Pinax Tutorial, Pinax, Tutorials, Uncategorized
Feedback: View Comments

In the last weeks I was studing Pinax , an Open Source platform for building Django applications. While I enjoyed a lot learning how to develop software with this framework, and I am going to happily use it for a series of projects, I found a bit difficult to get documentation about it, if not reading the source code and the (few - at this time) documentation on the project web site.When I started, I decided to write a test application for understanding the Pinax philosophy before going for real development projects. I thought it would be very useful for...
Read the full post

A day with GeoDjango

Posted: April 01, 2009
Categories: OpenStreetMap, Python, PostGIS, Django, OpenLayers, GeoDjango, GDAL, Uncategorized
Feedback: View Comments

This time i will introduce a really brilliant framework that every serious Web/GIS developers should be aware of: GeoDjango.Django is a Python Web framework for agile developers. It implements best web frameworks practices like coding by convention, MVC, ORM, REST, URL dispatcher and so on. Django is for Python what Rails is for Ruby, Grails is for Java, and MonoRail (and now ASP.NET MVC) is for .NET.GeoDjango is a Django application that is now included in the Django trunk with a lot of excellent stuff for developing GIS web application.GeoDjango Building BlocksGeoDjango installation is based on Python, Django and two...
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

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

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