Archive for the ‘GIS’ 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…..

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

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

Setting up GeoServer on Ubuntu

Sunday, September 7th, 2008

Recently, I setup GeoServer on Ubuntu 8.04. It would be nice to share some information with everybody. it is not easy to install everything. Firstly, you need Ubuntu, you can download and install it by yourself from www.ubuntu.org. beside that, you need JDK6, Tomcat6 and Geoserver.war.

about how to install JDK and tomcat

here is a very good article from howtogeek.com. how to setup tomcat 6 on ubuntu.

http://www.howtogeek.com/howto/linux/installing-tomcat-6-on-ubuntu/

Step1. install JDK

open terminal , type ’sudo apt-get install sun-java6-jdk’

do not switch off the terminal.

step2. install Tomcat6

use commands

‘wget http://apache.hoxt.com/tomcat/tomcat-6/v6.0.xx/bin/apache-tomcat-6.0.14.tar.gz’

‘tar xvzf apache-tomcat-6.0.xx.tar.gz’

there are three versions tomcat, 14,16,18, choose your version, replace ‘xx’

follow the article, move all the installation file to ‘/usr/local/tomcat’

use commands

’sudo mv apache-tomcat-6.0.14 /usr/local/tomcat’

open another terminal , use command ’sudo nautilus’

it will open a new fie explorer , use the file explorer open this file

‘/usr/local/tomat/bin/shartup.sh’

at the 7th line add

‘export JAVA_HOME=/usr/lib/jvm/java-6-sun’

save it and close the explorer.

go back to the articles. setup automatically startup .

easy way is download the file, put it  at ‘/etc/init.d/’

in the terminal, use command ’sudo /etc/init.d/tomcat restart’ , btw, if you want to stop tomcat, use command ’sudo /etc/init.d/tomcat stop’

after restart it, if everything fine.  open our Firefox , via tomcat by address http://127.0.0.1:8180/

then you depoly your geoserver.war files. everything done.

Good luck

Xiaoyu

screenshots screenshot screenshots