Let’s get technical (Pt 2): Using Python data science libraries on web map tiles

This is Part 2 in a two-part series around using Vexcel data with Python. Part 1 can be found here.

In Part 1 of this series, steps were shared on how to perform simple operations to extract data from a web map tile service, and how to visualize that data in a Python notebook.

The objective in this article is a bit more ambitious. It’s designed to show how common computer vision algorithms can be simply applied to remote sensing data. As ever with data science, much of the challenge lies in mapping real world data to an algorithm and back again, and this article aims to show a clear method of taking geospatial data into a more abstract reference frame that’s better suited for analysis, and then back to the geospatial domain.

By using only three functions from Scikit Image and Scikit Learn, we can generate features that are highlighted on the map below. The three functions used are:

  • sklearn.preprocessing: StandardScaler
  • sklearn.cluster: DBSCAN
  • skimage.measure: find_contours All of the other code presented is really focused on transforming geospatial data to the domain of an image and then back again.