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

How to PUT new elements from .osm using APIv0.6?

0

Hello all,

I have an Android app which helps users to map some features at runtime using Deep Learning. The features (roundabouts, football fields, ...) are converted to xml/osm format file with their lat, lon attributes and negative ID's.

I want to call to the API (i had read all the guidelines about the topic and i want to try it first with the dev's api) to make a PUT call but i am not sure about how to do this... Which is the simplest way to make a Java PUT request passing a xml/osm file?

Thanks.

asked 02 May '18, 00:14

andresCC12's gravatar image

andresCC12
16113
accept rate: 0%

1

Before uploading data, have you actually downloaded data from the API? You do know that you will have to do that (and merge the edits from your users in to the existing downloaded data)?

(02 May '18, 23:16) SimonPoole ♦

I show a OSM map in the interface (with the osmdroid library) to let users check what is actually in the OSM and I only let them import new content to the map (in unmapping places).

(03 May '18, 10:30) andresCC12
1

A roundabout not connected existing data is not going to be very helpful

(03 May '18, 12:04) SimonPoole ♦

One Answer:

3

Does this previous question help?

answered 02 May '18, 11:00

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

Do I have to create first my own changeset in order to import new elements (for example a way)?

(03 May '18, 10:35) andresCC12
1

Yes, changes can only happen inside a changeset.

(03 May '18, 10:43) scai ♦

Source code available on GitHub .