Help in Scraping Data

123 views
Skip to first unread message

Abhiroop Sarkar

unread,
May 27, 2020, 9:02:38 AM5/27/20
to datameet
Hi, can someone help in extracting some data from http://www.loginmumbai.org/map.html ? There is a lot of data on here regarding Mumbai which can be helpful for further analysis.

I have spent some time on this and from what I saw, all the layers are displayed in 2 ways -
1. Directly parsing TopoJSON through OpenLayers.
2. Loading Vector Tiles (.mvt) through OpenLayers.
The smaller point and polygon layers are loaded directly whereas the heavier polygon and polyline layers are loaded through the vector tiles.

What I am having trouble with is extracting the vector tiles. For example, I want the layer under "LandUse and Development Plans" > "Mumbai Existing Land Use". Fetching the zoomed out .mvt file and loading it in QGIS works but zooming in shows that the edges of the polygons are very jagged. Zooming in and then fetching the .mvt file produces perfectly clean geometry but only for a small region (only the specific tile).

Can someone help in getting such layers in a clean way? One of the ways would be to automate the process of panning the zoomed in webmap to gradually load the detailed .mvt files and save them automatically upon loading, but I lack the coding expertise to implement this. Any and all suggestions are welcome.

Thank you.

Souvik Sankar Mitra

unread,
May 28, 2020, 8:48:49 AM5/28/20
to datameet
To download mvt of "Mumbai Existing Land Use" I have written this code. As the mvt files are stored according to zoom level . I run it from zoom level 10 to zoom level 21. This stores all mvt files w.r.t zoom level in different directory. Hope it helps. 
test.py

Abhiroop Sarkar

unread,
May 28, 2020, 12:03:04 PM5/28/20
to datameet
Hi Souvik, this is an extremely wonderful script. I just tried this and it seemed to work great in all the different scenarios. Thanks a lot for the help!

Souvik Sankar Mitra

unread,
May 28, 2020, 2:21:28 PM5/28/20
to datameet
I am also glad sir it helps. 
Reply all
Reply to author
Forward
0 new messages