Archive for the ‘Open Source’ Category

Geoserver rendering Openstreetmap v2,part1

Friday, May 21st, 2010

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

OpenGeo release videos on Youtube

Sunday, November 8th, 2009

Paul Ramsey keynote at FOSS4G 2009

Versioned GIS Editing Demo (GeoServer, OpenLayers)

the 3rd anNUal openstreetmap hosting in amsterdam, NL

Thursday, 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…..

Open Source on Mac OS

Monday, June 22nd, 2009

after i sold my Dell d600 which about 5 years old. I got my first mac at 2009 April. as you see, i have use mac for a while.

And my mac is the cheapest mac in the mac store. it is the latest version mac mini.

the photo is took in 04 Beijing. it is the first time I meet Jim’s mac, which is my first time meet Mac computer and system.

macFriends

JimMacSam

Now back to Open source topic. few weeks ago, i got one old desktop which is 7 years old. it is quite old pc. but to install XP or linux. it is still quite fast. To use voipdisacount call my mom who live in China. I have to install XP on the old pc. however, there is only wireless available at my home. The 7-years-old desktop is definitely without wifi. then my old desktop is standalone pc, which is useless. because i want to install voipdisaccount call China. well, Thanksful, I figure out, mac os can easily share internet resource with other pc via cable or firewire. besite that, there is few options allow mac user to hosting web/share file/etc.

accidently, I found that mac os preinstall Apache Http Server and Filezila FTP server(actually, right now I am not sure about their license), anyway, I am very surprised about that. I thought Mac os would supply its own http server or FTP server. These components won more credits than ms.

finally, i found Python also pre-install on mac os. since I go to mac os world, I start understanding people why shift to mac , NEVER BACK TO MS OS.

If I discover more interesting stuff from mac, I would post here later on.