Thinking in GIS
a blog about GIS from a urban geogeek living at the countryside
The Pinax Tutorial #5: Adding a comment system
Posted: December 21, 2009Categories: 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
Read the full post
The Pinax Tutorial #4: Using avatars, pagination and profiles
Posted: December 19, 2009Categories: 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
Read the full post
The Pinax Tutorial #3: Internationalization of the application
Posted: December 18, 2009Categories: 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
Read the full post
Using MongoDb to store geographic data
Posted: December 06, 2009Categories: 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
Read the full post
The Pinax Tutorial #2: Developing the basic application and plugging it in Pinax
Posted: November 29, 2009Categories: 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
Read the full post
Geocoding with GeoPy
Posted: October 14, 2009Categories: 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
Read the full post
The Pinax Tutorial #1: Installing Pinax and making basic customisation
Posted: October 10, 2009Categories: 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
Read the full post
The Pinax Tutorial, Introduction for Web Designers
Posted: October 03, 2009Categories: 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
Read the full post
A day with TileCache: generating KML Super-Overlays
Posted: August 06, 2008Categories: 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
Read the full post
A day with FeatureServer #2
Posted: May 03, 2008Categories: 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
Read the full post
Do you get errors in the mapscript c# tutorial?...
Posted: February 29, 2008Categories: 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
Read the full post
A day with FeatureServer #1
Posted: February 21, 2008Categories: 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
Read the full post
Installing PostGIS on Ubuntu
Posted: January 30, 2008Categories: 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
Read the full post
Installing MapServer on Ubuntu
Posted: January 10, 2008Categories: 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
Read the full post
Installing Zope and Plone from source on Ubuntu in 10 easy steps
Posted: January 02, 2008Categories: devs, Zope, CMS, Plone, Ubuntu
Feedback: View Comments
Here are my notes for installing Zope and Plone from source in Ubuntu. I took this notes installing on 7.10 (Gutsy) but should work without problems for earlier Ubuntu versions, and for other Linux platforms-1- install libraries needed for build (build-essential) and Zope-2- download zope 2.10.5 and plone 3.0.4wget https://launchpad.net/plone/3.0/3.0.4/+download/Plone-3.0.4.tar.gzwget http://www.zope.org/Products/Zope/2.10.5/Zope-2.10.5-final.tgz-3- unzip the downloaded filestar -xvzf Zope-2.10.5-final.tgztar -xvzf Plone-3.0.4.tar.gz-4- create the makefile and set the prefixcd Zope-2.10.5-finalway1:./configuregedit makefile and set prefix=/opt/Zope-2.10.5or way2 (simpler): ./configure --prefix=/opt/Zope-2.10.5-5- Install Zope (at the location set in prefix)sudo make install-6- create an user for zope not run as suggested: "Now run '/opt/Zope-2.10.5/bin/mkzopeinstance.py'" but create an...
Read the full post
Read the full post
Ruby on Rails applications with Mongrel cluster and Apache url rewriting on Windows
Posted: November 15, 2007Categories: devs, Windows, Ruby on Rails, Apache
Feedback: View Comments
In the last post I showed you a configuration for serving Ruby on Rails applications with Mongrel cluster and Apache in a *nix environment (Ubuntu).With this post I will reproduce the same configuration in a Windows environment.The main difference in Windows is that you cannot use the mongrel_rails command with the cluster option (provided by the mongrel_cluster gem) that relies on daemonize functionality, only available on *nix platforms.What you will need to do is to manually create n Mongrel services for the n clusters you will need. Let's see how to do that.Install Ruby, gems and then install...
Read the full post
Read the full post
Ruby on Rails applications with Mongrel cluster and Apache url rewriting on Ubuntu
Posted: November 08, 2007Categories: devs, Apache, Ruby on Rails, Ubuntu
Feedback: View Comments
This is the workflow I followed for setting up my Ubuntu (Ubuntu 7.04 - the Feisty Fawn, but should work without problems also for the latest Ubuntu 7.10 - Gutsy Gibbon ) development machine for serving Rails application with Mongrel clusters and Apache.Install Ruby, gems and Ruby on Rails# install rubysudo apt-get install ruby ri rdoc libmysql-ruby# download rubygemssudo wget http://rubyforge.org/frs/download.php/20989/rubygems-0.9.4.tgz# tar rubygemstar -xvzf rubygems-0.9.4.tgz# ruby setup.rb rubygems scriptcd rubygems-0.9.4sudo ruby setup.rb# download and install Ruby on Rails frameworksudo gem install rails --include-dependenciesmoreInstall Apache 2.2 and enable the needed modules (url rewriting, proxy, proxy_balancer e proxy_http)# install Apache 2.2sudo...
Read the full post
Read the full post
Writing the Domain Model classes: coding time (Castle MonoRail and ActiveRecord Tutorial - Part 5)
Posted: September 13, 2007Categories: devs, Tutorials, .NET, CastleProject
Feedback: View Comments
This is the fifth post of a series started with this post about a MonoRail and ActiveRecord tutorial.With this post we will finally start to write code for our MonoRail and ActiveRecord tutorial. Here we will go on writing the model classes, and from them we will autogenerate the database schema (alternatively you could first create the database schema and then generate the classes using the generator).We need to write 5 classes for our 5 models (Album, AlbumGenre, Artist, Genre, Support). As we discussed the convention is to place them under the Models folder of our CastleProject solution.So let's create...
Read the full post
Read the full post
Writing the Domain Model classes: implementing Relationships (Castle MonoRail and ActiveRecord Tutorial - Part 4)
Posted: August 30, 2007Categories: devs, Tutorials, .NET, CastleProject
Feedback: View Comments
This is the fourth post of a series started with this post about a MonoRail and ActiveRecord tutorial.Last time we wrote the Album class and we have seen how to implement the primary key mapping and simple properties mapping.With simple properties mapping I mean the class properties that will go to map simple data type in the database. Instead with complex properties I will mean the class properties that will go to map a relationship with another table in the database.For the album class there are simple properties (ID, Name and Year) and complex properties (Support, Artists and Genres).The simple...
Read the full post
Read the full post
Writing the Domain Model classes: implementing Identifiers and Properties (Castle MonoRail and ActiveRecord Tutorial - Part 3)
Posted: July 10, 2007Categories: devs, .NET, CastleProject
Feedback: View Comments
This is the third post of a series started with this post about a MonoRail and ActiveRecord tutorial.There are several approaches for writing the domain model classes for a MonoRail and ActiveRecord application:Create the domain model classes from a generator, providing a database schemaCreate the domain model classes from scratchConsequently, if you have chosen to create the domain model classes from scratch, after you have created the domain model classes you can auto-generate the database schema.If instead you have already the database schema, you could opt for the first point (and maybe retouch them after the generation).For the aims of...
Read the full post
Read the full post
Deployment of BIRT reports by email
Posted: June 05, 2007Categories: devs, Java
Feedback: View Comments
birt is a powerful Open Source Business Intelligence and Reporting Tools I came to use in the last weeks for a project. Its key features are:Eclipse based report solutionVery nice report designer producing a standard file. This file can be then used to deploy the report in several waysruntime component for easily serving reports on a server, also by a web server (like Tomcat)outstanding Java APIs for creating and modifying the report design (DE API), for consuming and deploying the reports in several ways (RE API) and for creating and rendering charts (CE API)For creating a BIRT report...
Read the full post
Read the full post
MonoRail and ActiveRecord configuration (Castle MonoRail and ActiveRecord Tutorial - Part 2)
Posted: May 27, 2007Categories: devs, Tutorials, .NET, OOAD, CastleProject
Feedback: View Comments
This is the second post of a serie started with this post about a MonoRail and ActiveRecord tutorial.Let's start developing our sample application. The first thing we need to do is to create a .NET project configured for using the CastleProject stuff. You can go in two ways:Create a Visual Studio project with the MonoRail project wizard.The wizard will create for you the MonoRail project structure, generate the configuration elements in the web.config file and add all the necessary references to the project. You will be prompted to choose a view engine (NVelocity, Brail or ASP .Net Web Forms), if...
Read the full post
Read the full post
Castle MonoRail and ActiveRecord Tutorial (Part 1)
Posted: May 22, 2007Categories: devs, Tutorials, .NET, CastleProject
Feedback: View Comments
In the last 2-3 years there were a lot of talking about agile and high-productivity development with an outstanding framework that is already in the legend, like happened to Java in the late 90s: Ruby on Rails.Given its success, many other project in the Open Source community were born trying to reproduce the beauty of the Ruby on Rails rapid and agile development framework for other environments. Just to name a few: Turbogears for Python and Grails for Java.The main features of these rapid development framework generally are:Convention over configuration PatternMVC PatternInversion of Control Containers and the Dependency Injection PatternAn...
Read the full post
Read the full post
Cuyahoga: "Hello World" sample module tutorial
Posted: April 30, 2007Categories: Cuyahoga, .NET, devs, OOAD, Tutorials, CMS
Feedback: View Comments
Cuyahoga is an impressive Open Source web site framework (and CMS) with many impressive features like:RDMBS indipendency via NhibernateEnterprise architecturePlug-in architectureDeployable, using Mono, to platforms different from Windows, like Linux, Mac OS X, Solaris, unlike other popular .NET CMSSearch engine based on dotLuceneFull ASP .NET 2.0 enginelogging system via log4net (the same logging engine in zigGIS)People willing to deeply dig in Cuyahoga may download the latest release (1.5.0) source code and this basic tutorial for developing Cuyahoga modules.The problem with this tutorial is that is a bit out of date (is based on VS 2003 and on a old release...
Read the full post
Read the full post
Union of two geometries in PostGIS
Posted: March 30, 2007Categories: devs, PostGIS
Feedback: View Comments
For people not familiar with the Spatial SQL, I post this quick sample showing its beauty and simplicity at the same time.We will go using PostGIS, but this could be performed in a similiar way with any GIS Database compliant with OGC Simple Feature Access - SQL Option.The geomunion functionThe geomunion Open GIS function make it possible to combine two geometries and getting from these a single geometry.FUNCTION geomunion(geometry, geometry) RETURNS geometryIt is very easy to generate a geoprocessed layer from an original layer, making an union of its polygons based on a common attribute.I will show you how...
Read the full post
Read the full post
Next Page ยป