0

Can anyone see anything wrong with the following set of commands? Every time I run these image.png is a image of the UK and not the JOSM map I exported. I'm guessing there's something awry with the db import however the output mentions that it's processing my coords and data.

Steps:

1 - Exported a .osm file from JOSM or Merkaator.

2 - Imported into psql using the following command:

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

The output for this looks like:

    marshall@ubuntu:~/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

I can see the correct lat/lon coords being passed in, I'm not sure how to verify this within the database

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

4 - ./generate_image.py

At this point image.png is a map of the UK, not Singapore which I have specified.

Can anyone see anything wrong with this? This is with mapnik 0.71 on ubuntu

4

1 回答 1

0

找到了解决方案。

问题是 generate_image.py 脚本不会从数据库中读取数据,而是将其硬编码在里面。我不确定这背后的原因。

解决方案是手动编辑 generate_image.py 并更改相关行:

ll = (103,1.3,104,1.4)
于 2010-08-05T02:11:43.583 回答