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

Error 403 - Forbidden when trying to post coordenates to my map

0

Hello everyone,

I'm new to map making, so I'm learning how to do some stuffs. I'm trying to create a custom map using uMap. I would like to load some latitude and longitude coordenates using a python script because they are too many. I have tried to use a post request and using this url

"https://umap.openstreetmap.fr/es/map/<map_id>/datalayer/update/<layer_id>/"

And also provided sessionid and csrftoken cookies (I copied the values using the inspect feature).

To test the post request, I'm trying to add only 1 single point to a map using this:

from geojson.geometry import GeoJSON

d={
  "type": "Feature",
  "geometry": {
    "type": "Point",
    "coordinates": [125.6, 10.1]
  },
  "properties": {
    "name": "Dinagat Islands"
  }
}

Using all this, I'm just getting "Error 403-Forbidden". Why is this and how can I solve it?

asked 25 Aug '20, 03:33

ppsev's gravatar image

ppsev
11112
accept rate: 0%


One Answer:

1

If your aim is just to avoid manual data entry you may be better off either:

  1. Generating the data locally and using the "import data" option to upload the file. This is the fist button on the second panel of buttons on the right.
  2. Uploading your file to somewhere you can update as necessary and editing the layer properties to point at that location using the "Remote Data" options.

answered 25 Aug '20, 14:00

InsertUser's gravatar image

InsertUser
11.0k1369185
accept rate: 19%

Hello @InsertUser. Yes, I want to avoid manual data entry but mostly avoid the usual import option. I'm aware of the "import data" available in OSM, but the thing is that I have actually lots of points to upload (more than 300k). Last time I tried to upload around 50k points in csv format, the website froze :(.

(25 Aug '20, 14:07) ppsev

Where is your data from originally? Is it OSM based?

(25 Aug '20, 16:40) InsertUser

Hmmm kinda. Its from a map based on osm and probably umap, but I'm not sure about the second one. I extracted the latitude and longitude based on that map because its way more accurate than consulting the string direction directly in osm (or even google maps).

(25 Aug '20, 17:05) ppsev

Source code available on GitHub .