OSMLatvija / Osmalyzer

Parsing OSM data in Latvia against various data sources
https://osmlatvija.github.io/Osmalyzer/
GNU General Public License v3.0
2 stars 1 forks source link

Bottle return point (Depozīta punkti) locations #21

Closed HellMapGoesCoding closed 1 month ago

HellMapGoesCoding commented 7 months ago

https://www.depozitapunkts.lv/

https://projects.kartes.lv/dio_api/

markalex2209 commented 1 month ago

Actual list of punkts is requested from here (It's behind 302, but I think we should use this URL too).

Points exist in three types:

markalex2209 commented 1 month ago

We started implementation. Have a question regarding JSON parsing: was the decision not to use a parser a conscious choice, or it just happened? And if latter, how open are you to incorporating an actual parser into project? And do you have any preferences?

HellMapGoesCoding commented 1 month ago

Actual list of punkts is requested from here

Thanks for looking into it, yeah this seems good.

  • B - Beramtaromāts.

This is a stand-alone vending machine where you drop the bottles in, like at an entrance to a shop. This is what these points are like in most of the world that do them. What they call "automatic" for A is also a vending machine, but it's inside that small kiosk/building and there's a person attending in the back.

Have a question regarding JSON parsing: was the decision not to use a parser a conscious choice, or it just happened? And if latter, how open are you to incorporating an actual parser into project? And do you have any preferences?

I believe I'm already using Newtonsoft.Json where I can. If I am not using it, it is most likely because either the data was broken/unreliable or it was very complicated layout and I didn't want to hard-code complicated structures. In short, I avoid JSON parsing because I expect data sources to change/break eventually. For example, I have no idea how many have already had changes, but because I only hard-coded the part I need, it still works. Same for HTML parsing and basically anything I can avoid doing "properly". So yeah, doing this "badly" was intentional ;)