Geoserver rendering Openstreetmap update1 (windows)

May 1st, 2010

<!– @page { margin: 2cm } P { margin-bottom: 0.21cm } A:link { so-language: zxx } –>

Geoserver rendering Openstreetmap update1 (windows)

Two years ago, I started using Geoserver and PostGIS. I was very exciting and satisfied about performance. Since 2009, I don’t have a lot of work about Geoserver. Time flies, last week I have some assignment about Geoserver again. So I can refresh my geoserver memory.

For today, what I am going to do :

  1. import latest Openstreetmap data into PostGIS

  2. Render it by Geoserver 2.0.1

Here is information about local settings.

–Platform: windows XP SP3

–Postgresql 8.3 + PostGIS 1.3.5

–uDig 1.1.1

–Tomcat 6.0 + Geoserver 2.0.1

To import osm data into PostGIS:

I suggest that you read following articles before you start.

–general information about osm2pgsql tool

http://wiki.openstreetmap.org/wiki/Osm2pgsql

– There is some important information about osm2pgsql tool and PostGIS

http://wiki.openstreetmap.org/wiki/Mapnik

– general information about OpenStreetmap dataset

http://wiki.openstreetmap.org/wiki/Planet.osm

Data and tools:

osm2pgsql windows version

http://tile.openstreetmap.org/osm2pgsql.zip

osm dataset(I used planet-nl-100423.osm.gz , around 500MB)

http://hypercube.telascience.org/planet/

(sometimes, their service is not available.)

before start:

I have already created one postgis database.

Step1: unzip osm2pgsql to c:\ osm2pgsql\ and add the osm2pgsql path to system path.

http://www.guanxiaoyu.net/wp-content/uploads/2010/05/01.png

add c:\osm2pgsql\osm2pgsql to system path

windows Key + E, show file explorer.

Then on file tree, right click mouse, then click properties.

On properties windows, click ‘Advance ‘Tab

click Environment variable

http://www.guanxiaoyu.net/wp-content/uploads/2010/05/02.png

Edit path :

http://www.guanxiaoyu.net/wp-content/uploads/2010/05/03.png

click ok and ok…

Step2: In the osm2pgsql folder, there is a sql query which named 900913.sql.

Run it on your database, you can run it via pgadmin or psql tool.

Step 3, import data into database.

Open one command window,

type “osm2pgsql -h”

http://www.guanxiaoyu.net/wp-content/uploads/2010/05/04.png

then type “osm2pgsql -c -d YOURDATABASENAME -U postgres -s -v -S c

:\osm2pgsql\osm2pgsql\default.style D:\openstreetmap\planet-nl-

100423.osm.gz”

(When you import data, better switch off all other programs, because importing would take a lot of your ram.)

After a while you should see something like this:

osm2pgsql SVN version 0.69-20874M

Using projection SRS 900913 (Spherical Mercator)

Setting up table: planet_osm_point

NOTICE: table “planet_osm_point” does not exist, skipping

NOTICE: table “planet_osm_point_tmp” does not exist, skipping

Setting up table: planet_osm_line

NOTICE: table “planet_osm_line” does not exist, skipping

NOTICE: table “planet_osm_line_tmp” does not exist, skipping

Setting up table: planet_osm_polygon

NOTICE: table “planet_osm_polygon” does not exist, skipping

NOTICE: table “planet_osm_polygon_tmp” does not exist, skipping

Setting up table: planet_osm_roads

NOTICE: table “planet_osm_roads” does not exist, skipping

NOTICE: table “planet_osm_roads_tmp” does not exist, skipping

Mid: pgsql, scale=100, cache=800MB, maxblocks=102401*8192

Setting up table: planet_osm_nodes

*** WARNING: intarray contrib modul

OpenGeo release videos on Youtube

November 8th, 2009

Paul Ramsey keynote at FOSS4G 2009

Versioned GIS Editing Demo (GeoServer, OpenLayers)

Visual Stuido on Mac OS

July 22nd, 2009

Since I bought mac mini, I like working on Mac systems. However, sometimes, you do have problem of it. for example, if you want to use Visual Studio on Mac system, there is no Visual Studio 2009 Mac version. What you can do about it ?Normally, there are two ways to solve the problem. The two ways are installing VirtualBox/ VMware/ Parrallels and install bootcamp + Windwos system. then you install your visual studio on the windwos sys. for me, I do like this two solutions. they affect the performance of mac, and I want to install Windows on Mac(since windows always copy other people’s work, it is shame to use their products) Here I use the third method. the methods is installing MS remote desktop connections. of course, the down part is you need second computer which link to same network with mac. but it is work perfect for me.

Visual_studio_on_mac_mini

Visual_studio_on_mac_mini

the 3rd anNUal openstreetmap hosting in amsterdam, NL

June 25th, 2009
openstreetmap

openstreetmap

the openstreetmap conference is hosting in Amsterdam , it is nice to be there. OSM member got free access. otherwise, you have to pay Gelds…..

GIS tech should be use in future air planes—- my opinion about missing plane from air france

June 25th, 2009

as we know, if there is a plane crashed, the only evidence or data of the plane is the black box. and what is a black box. Normally, it is very very very strong metal tape recorder, which can record all kinds data of airplane for certain length(such as, store 30min data before it crash). however, the problem is that , if the black box cannot find back, you dont have any data left. it doesn’t matter how many black box you store in a airplane, it doesn’t matter which safe position you stored. actually, it is never safe to store it on airplane. because it will crash.

I am GIS people, we are think in spatial way. why not design a GIS system for airplane? the airplane send instantly data back to central server via satellite. nowadays technology, i think our IT engineering can make it come true. as i know, people recording all satellite data, which orbit it running, which height, which position. they all can be remotely stored in somewhere else, you dont need to store the data on satellite.

in future, there should be some system can store all data of flying object on the ground. maybe  google will solve the problem, google have a big index database. it index everything on internet. from ge, sometimes we can some dynamic maps of satellite or ships. So GIS technology is a good solution for engineer get rid of the black box. why we need a old tape recorder in 21st centuries.