NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I build a local tile server using mapnik, PostgreSql, mod_tile, Apache based on Ubuntu16.04. I want to edit my local tile server online just like openstreetmap.org. But I don't want to upload my changes to openstreetmap server.How can I do this? I really need your help!!!

asked 20 Nov '17, 14:53

gleide's gravatar image

gleide
797712
accept rate: 50%


I finally solved this problem as follows: Firstly, I import a .osm file to openstreetmap database which used by Rails port. Then I can edit map online with iD editor. After doing some change, I uploaded changes to openstreetmap database. Then I import the databese to a .osm file. Using osm2psql import this .osm file to my local gis atabase. Hope can help someone who met the same question.

permanent link

answered 25 Nov '17, 14:05

gleide's gravatar image

gleide
797712
accept rate: 50%

If you just want to make a few minor changes, it might be easiest to make changes directly to your PostgreSQL database, using either an SQL tool like pgsql or pgadmin or a GIS editor like QGIS.

If you have bigger plans - more people editing, using ID/JOSM, making more edits - then things become complicated; in addition to what you have already set up, you must then set up the OpenStreetMap web site which, despite its name, also contains the API used by these editors. This comes with its own database which holds OpenStreetMap data, just in a different format. You will need to import existing OpenStreetMap data into that database using Osmosis (--read-pbf --write-apidb), and then you can make changes on that database with standard OSM editors. You will further have to ensure the changes made in that database find their way into your rendering database, either by doing regular exports (from API database into PBF with Osmosis, from PBF to PostGIS with osm2pgsql), or by configuring change replication with Osmosis.

Note that no matter which of these ways you choose, any edits you make could be overwritten by future updates from OSM, so this will cut you off from OSM updates.

permanent link

answered 20 Nov '17, 16:31

Frederik%20Ramm's gravatar image

Frederik Ramm ♦
82.5k927201273
accept rate: 23%

Thanks for your answer.I have set up OpenStreetMap web site.In order to see my own map not openstreetmap's , I changed the file vendor/assets/openlayers/OpenStreetMap.js, adding "http://localhost/osm_tiles/${z}/${x}/${y}.png".Finally I could sign up and login to my localhost:3000 page.But when I edit something, the save button says my changes will upload to openstreetmap server.Could you speak more specifically how can I import existing OpenStreetMap data into that database using Osmosis and make changes on that database with standard OSM editors. I really need your help!!!This question has bothered me for a long time.Thank you very very much!!!

(21 Nov '17, 16:22) gleide
1

I think you don't have to be bothered by the "will be uploaded to OpenStreetMap" message - surely you are using a different account/password with your local server than with OpenStreetMap, so even if you did something wrong, it will not be able to upload anything because the password is wrong. -- For loading OSM data into your local database, see https://help.openstreetmap.org/questions/50109/loading-data-to-apidb and make sure to start with a very small amount of data first, to get an idea how long it takes.

(21 Nov '17, 16:26) Frederik Ramm ♦

Firstly,thanks for your help.But I met new problem.I use this command "osmosis --read-pbf /home/yeager/Downloads/beijing_china.osm.pbf --write-apidb host="localhost" database="openstreetmap" user="openstreetmap" password="openstreetmap" validateSchemaVersion="no"" But it failed says that "org.postgresql.util.PSQLException: FATAL: password authentication failed for user "openstreetmap"".I just follow the guide on openstreetmapwebsite install.md. after I installed it I could find two new database one called openstreetmap the other osm_test. these two databases's initial owner is my username. Then I creat a new user named openstreetmap and set the unix password "openstreetmap".Then I alter the two databases' owner to new owner openstreetmap. So is there somewhere wrong?

(22 Nov '17, 17:12) gleide
2

Try this:

sudo -u postgres psql openstreetmap -c "alter user openstreetmap with password 'openstreetmap'"

I find it strange that you have only two databases, and not a third called "openstreetmap_dev" which used to be created also. If you stumble over the lack of this database later, you might have to debug why it wasn't created, and maybe created that by hand (it has the same structure as the openstreetmap database).

(22 Nov '17, 18:27) Frederik Ramm ♦

Thanks very much. With your help I successfully import my osm data to my openstreetmap database. I was very glad. But afer I opened my browser and typed localhost:3000, I saw the slippy map, not only my new database,but all over the world, Could you please tell me why this happened? I just cannot see any differences between importing data to database openstreetmap with not importing data to database. Another thing is strange, when I click "edit" button ,I did some changes to my map and saved it, But I can only see changes in edit page, In my initial log in page I cannot see any change.

(23 Nov '17, 16:38) gleide

Hello, did you see my question, I would be grateful if you could help me. Thanks for your help.

(24 Nov '17, 08:54) gleide
showing 5 of 6 show 1 more comments

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×57
×39

question asked: 20 Nov '17, 14:53

question was seen: 5,098 times

last updated: 25 Nov '17, 14:05

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum