Posts Tagged ‘Windows’

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

Visual Stuido on Mac OS

Wednesday, 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