cctv-010/README.md
2025-05-25 10:31:41 +02:00

3.7 KiB

Mapping cameras in the city

Rotterdam has a lot of streets with live view cameras. The list of these streets is published in Gemeenteblad for the city and this is an attempt to put this data on a map. The specific locations of cameras aren't published but this is a good start.

here's where you can find the lists

Caution

This map is not complete! Look in docs/add-manually.md for a list of streets/parks etc that were not properly imported. Also check the gemeenteblad before trusting this map as the data might have changed in the meantime.

How to view the map on your computer

  • Install qgis
  • in qgis, go to Plugins → Manage and install plugins → find QuickMapServices and install it
  • go to Project → Open and open the .qgz file

Info

grayscale map with a bunch of red lines

this is a WIP, the current structure of repo is as follows:

  • docs/
    • add-manually.md - list of places that are not picked up by scripts and have to be added manually to the map. it's important to update this based on the info you get from working-data/05
  • source-data
    • all-streets - what I copied from the OG 2022 gemeenteblad with the camera plan. Doesn't include further changes. Not very useful
    • by-district/ - the document that describes the camera surveillance divides the city into 11 districts. So there's 11 files in that directory, each containing an annotated list of streets in that district, with further updates from the gemeente. Also includes spelling fixes (surprising amount of misspelled streets in the source documents, but sometimes also the streets are just called differently in OSM. For example Overpass doesn't like "1° Pijnackerstraat" but "1e Pijnackerstraat" works fine. Or the municipality put A. Wellingpad in the document they published but the street is actually called Alberta Wellingpad on OSM.)
    • query-header and query-footer - don't worry about it too much, this is used by scripts/03-build-query-for-district which includes the header and footer in every file it generates. You'll need to play with this if you choose to run these scripts for a different city, because that's where Rotterdam is coded in.
  • scripts/ - the heart of this repo. A set of bash scripts using some basic unix utils and the Overpass API to parse the source data and return jsons that can be converted into geojson. They should be ran in order, starting from 01-sed-to-single-line, till 05-show-missing-streets. Each of them will take data from the previous one and output to working-data/its-own-number so you can inspect the data at every step of the process.
  • geojson-files/ - QGIS, which I use to assemble the maps accepts data in geojson format. This is where those files should land. Think of it as the output directory of this program. This is not populate by any script. You have to run for i in working-data/04/*; do osmtogeojson "$i" > "geojson-files/$(basename $i)"; done from the root dir of this repo to get those files, and osmtogeojson is a node.js program that you obtain by running npm install osmtogeojson
  • working-data - this is where each script outputs its data. Ideally you don't need to look into here, except for debugging. one interesting place is working-data/05 which contains all the places that were requested from the overpass api but didn't return for one reason or another.