2010-08-05 66 views
0

任何人都可以看到下面的一組命令有什麼問題嗎?每次運行這些image.png都是英國的圖像,而不是我輸出的JOSM地圖。我猜測數據庫導入存在一些錯誤,但是輸出提到它正在處理我的座標和數據。Mapnik忽略我的經緯度長框

步驟:

1 - 從JOSM或Merkaator導出一個.osm文件。

2 - 使用以下命令導入到PSQL:

osm2pgsql -m -d gis -S ~/mapnik/default.style -b 103,1.3,104,1.4 ion.osm -v -c 

這種情況的輸出如下所示:

[email protected]:~/mapnik$ osm2pgsql -m -d gis -S ~/mapnik/default.style -b 103,1.3,104,1.4 ion.osm -v -c 
osm2pgsql SVN version 0.66- 

Using projection SRS 900913 (Spherical Mercator) 
Applying Bounding box: 103.000000,1.300000 to 104.000000,1.400000 
Setting up table: planet_osm_point 
Setting up table: planet_osm_line 
Setting up table: planet_osm_polygon 
Setting up table: planet_osm_roads 
Mid: Ram, scale=100 

Reading in file: ion.osm 
Processing: Node(25k) Way(3k) Relation(0k) 
Node stats: total(25760), max(844548651) 
Way stats: total(3783), max(69993379) 
Relation stats: total(27), max(536780) 

Writing way(3k) 

Writing rel(0k) 
Committing transaction for planet_osm_point 
Sorting data and creating indexes for planet_osm_point 
Committing transaction for planet_osm_line 
Committing transaction for planet_osm_roads 
Sorting data and creating indexes for planet_osm_line 
Committing transaction for planet_osm_polygon 
Sorting data and creating indexes for planet_osm_roads 
Sorting data and creating indexes for planet_osm_polygon 
Completed planet_osm_polygon 
Completed planet_osm_roads 
Completed planet_osm_point 
Completed planet_osm_line 

我可以看到正確的緯度/經度COORDS被傳入,I」 m不知道如何在數據庫中驗證這一點

3 - ./generate_xml.py --accept-none --dbname gis --symbols ./symbols/ --world_boundaries ../world_boundaries/

4 - ./generate_image.py

在這一點image.png是英國,而不是我指定的新加坡的地圖。

任何人都可以看到有什麼不對嗎?這是在Ubuntu上的mapnik 0.71

回答

0

找到了解決方案。

問題是,generate_image.py腳本不從數據庫中讀取數據,而是在裏面硬編碼。我不確定這背後的原因。

解決方法是手動編輯generate_image.py和更改相關線:

ll = (103,1.3,104,1.4)