This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

After I import a new area to my postgresql, Why cannot I see my new imported data?

1

Hello, I bulid my own tile server using mod_tile, mapnik, PostgreSql, osm2psql, Apache2, leaflet based on ubuntu16.04. But after I used the command "osm2pgsql --slim -d gis -C 3600 --hstore -S openstreetmap-carto-2.41.0/openstreetmap-carto.style chongqing_china.osm.pbf" to update my database. I was sure that the database was updated. But when I typed my ip in my broswer, what I could see wes my previous mapdata not my new data. What should I do to see my new imported mapdata?

asked 25 Nov '17, 04:43

gleide's gravatar image

gleide
797712
accept rate: 50%

First time I use the command I can see the map that is what i imported, But when I use the command to import a different area to the same database, I still only see the previous map. I did renderded again and restarted apache. Hope someone could help me! Thanks very much.

(25 Nov '17, 11:55) gleide

One Answer:

2

You'll need to stop and restart renderd and apache

sudo /etc/init.d/renderd restart
sudo /etc/init.d/apache2 restart

you'll want to remove old tiles:

sudo rm -rf /var/lib/mod_tiles/wherever/?
sudo rm -rf /var/lib/mod_tiles/wherever/??

and the first time you view the new area in a web browser you'll need to clear-cache or "shift-refresh" to force load a new tile.

answered 25 Nov '17, 12:02

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

2

Thank you very much. That solved my problem!

(25 Nov '17, 13:08) gleide

Source code available on GitHub .