Scraping data from web maps?

  • For 1st case, you didn't look enough. You should look at this type of URL. It's the clue to get the shop informations although as stated by other people, I'm not sure it's really allowed...

  • For the 2nd case, you just need to reuse the URL calls your already discovered. Using a grid, you can get a series of regular coordinates to set geometry parameter in the URL. As it has a 10(px) tolerance, your grid should be every 5km (1px is approximatively 500m when looking all Switzerland in the map).

You can build grids using QGIS or https://github.com/Turfjs/turf-point-grid or other tools of your choice to create your data sets (I would recommand GeoJSON output, very simple to manipulate in any programming language).

You may need in both case to add a delay to your URL calls to avoid being banned by remote servers and also not putting an overload on a server you do not own...

Tags:

Data