OpenStreetMap POI ID

4ybaka shared this question 52 days ago
Answered

I'm writing plugin to edit osm poi. I can't distinguish which type belongs to osm poi and which to locus poi. How can I get osm poi id in kotlin version?

Comments (1)

photo
1

Hello,

it depends ... on when you need this information. There is currently no official API for this anyway if you are able to obtain the whole point over API, you may then extract OSM data from GeoDataExtra object under this ID. In JSON should always be entityId, entityType and also node tags.

Let me know if this is usable for you and if not, I'll need more info about your usecase.

Menion

photo
1

Thanks for reply,


> if you are able to obtain the whole point over API


Could you please clarify this part. Do you mean if I used osm api to get poi? I planned to get locus poi and extract osm poi id from it and then use osm api to get the osm poi for modification.

photo
1

Hello, understand ...

Try to:

- register your application in the point context menu

- when you have a point, you may then extra ID from pt.geoDataExtra object as I mentioned before.

photo
1

It works. Thanks!

photo