Linux Enviroment Update.

So far progress has only been made on Windows Vista and XP. I have a lack of experience in Linux operating systems and this proved to be my downfall. I initially had a lot of trouble enabling network connectivity in the OS and in my opinion Ubuntu is unproductive and difficult to work with without internet connectivity. (i.e getting a number of required libraries for certain packages is time consuming.)

Also, OpenJump is known to be unstable in Ubuntu Hardy. For now I’ll be sticking with whats working, if time allows I will go back and adapt the application for Linux systems. One up for Microsoft :-?

Progress Update… PGRouting Database!

Finally got Pgrouting enabled in a database, I found a tutorial on davidgis.fr website. Link can be found at the bottom of the page. I also found a very good FOSS4G workshop which goes into detail, providing source code for a html/php enabled routing application using Open Layers and Google Maps.

http://pgrouting.postlbs.org/wiki/WorkshopFOSS4G2007

I queried the sql code against the database and it everything seemed to go smooth. However, when I tried to load the application it would not work. I had a good look at the code involved and could see very little problems with it.

On another note, I installed OpenJump 1.2.0 and QGIS 0.11.0 and got both to successfully connect to the database. I ran a query just to show the geometry lines that are stored in the database. I plan to test a couple of routing queries over the next while and track the results.

I’m happy with my progress so far. I have a good grasp on the enviroment setup and a further insight on how to approach this project.

Installing PGRouting!

For some strange reason there is a major lack of information on installing newer versions of PGRouting in WIndows. I’m currently in the process of installing it so I will track the progress here:

  • Download the latest Window binary of PGRouting from: http://pgrouting.postlbs.org/wiki/pgRoutingDownload
  • In the zip file, you will find 2 folders, “lib” and “share”. From what I’ve gathered, the files in the lib folder go into the lib folder in the PostgreSQL installation (in my case C:\Program Files\PostgreSQL\8.3\lib\)
  • The files in the share folder should then be queried against a database of your choice, if the lib files are not in place you will get an error.

There’s quite a few errors cropping up constantly with the roads.sql file, but I’m going to split each function in the query and run each function seperately.

Vista Enviroment Setup

The previous enviroment setup was on my desktop computer. As I tend to be on the go a lot, I needed to adapt the project enviroment to my laptop. Vista Home Premium is on the laptop, and I ran into a couple of problems with PostgreSQL. The major problem was: failed to run initdb: 1!

Judging by related articles Vista and PostgreSQL seem to have a few problems with each other. A simple installer could not be used, without constant errors and rollbacks. After a certain length of time I eventually got PostgreSQL installed and working perfectly. A few steps involved were:

  • Use msi installer supplied by the PostgreSQL website and turn off the inidb function
  • During the initial installation one of the first screens asks the user for a username, domain and password. These details are important in the next step. The default username is “postgres”. In my installation I have used the default values.
  • Once installation is complete, goto Start -> Run -> type “cmd”
  • Type in: “runas /user:postgres cmd”
    Where postgres is the default username. You will be prompted for a password, enter the password you entered during the initial steps of the PostgreSQL installation.
  • If successful a new Command Prompt window should open up. In the new window navigate to the PostgreSQL bin folder (default is: C:\Program Files\PostgreSQL\8.3\bin).
    Then run the following command:
    initdb -D “C:\Program FIles\PostgreSQL\8.3\data” -U postgres -E UTF8

    Where -D is the location of your data folder, -U is the server username and -E is the encoding (can be changed later)

  • Installation of initdb should complete successfully.

Hope this helps some people out, as I had to figure the majority of this out myself. There’s very little on the resolution of this problem!

Enviroment Setup - Linux

One of the goals set out in this project is to try out the functionality in a couple of different enviroments to improve versatility. The previous enviroment setup was in Windows XP. As part of the project I’ve installed Ubuntu.

So far I have successfully installed PostgresSQL 8.3 with PGAdmin III. PGRouting has been applied to the database, installations to follow include:

PostGIS, Apache, PHP

To help on the installation of postgresSQL on Ubuntu Hardy I followed this tutorial:

http://hocuspokus.net/2008/05/13/install-postgresql-on-ubuntu-804/

XP Enviroment Setup - First Screen!!

Installed all the necessary components early last week and started making headway on getting a test program working to familiarise myself with the technology. All installations were made on Windows XP SP2.

Enviroment entails of the following:

  • PostgreSQL 8.3.3 with PostGIS 1.3.2 (having troubles with PGRouting (1.02) and Windows at the moment, will look into further detail in the next couple of days.)
  • Geoserver 1.6.5
  • JDK 6 Update 7 with NetBeans 6.1 (JDK needed for Geoserver installation)
  • Apache 2.2.9
  • PHP 5.2.6
  • Tomcat 6.0.14

I setup OpenLayers with Google Maps tiles.

OpenLayers with Google Maps

At the moment the projection is EPSG: 900913. But that is subject to change as soon as I research the most efficient projection to use. Application runs on IE7/8, will not run correctly on Firefox 3, I get the error the vector render is not support.

So as you can see the project is still in initial stages with the design yet to come.

Welcome!

This is the first post of many I will be posting over the course of 9 months…. The blog is going to track my progress of my final year project which is called “Routu”. Routu is a Realtime Route Analysis Tool, by the end of the 9 months I plan to have a fully featured web based routing application.

Where this routing tool differs from the rest lies in the fact that it will be tested against realtime data. I plan to get up to date traffic news and automatically plot it on a map, the routing algorithm will then be able to test its route against traffic data and the overall result should be the most efficient route for the end user and avoiding the majority of traffic congestion.

I was initiallly going to use Google Maps for the application, but upon research Google Maps seems to be unable to support the functionality I need to create this project. My weapons of choice are: PostgreSQL (w/ PostGIS and PGRouting) and OpenLayers.

Also, a secondary feature of the project is to get the application adapted for a GIS enabled PDA with Windows Mobile. More research has yet to be done on this area. All suggestions or opinions are more than welcome.