Get startedGet started for free

Convert to common CRS and save to a file

As we have seen in the previous exercises, both datasets are using a different Coordinate Reference System (CRS). This is also illustrated by the first plot in this exercise (for which the code is already provided in the script): both datasets are about the same region, so they should normally overlap in their coordinates; but they don't.

For further analyses in the rest of this chapter, we will convert both datasets to the same CRS, and save both to a new file. To ensure we can do distance-based calculations, we will convert them to a projected CRS: the local UTM zone 35, which is identified by EPSG:32735 (https://epsg.io/32735).

The mining sites (mining_sites) and national parks (national_parks) datasets are already loaded, and GeoPandas and matplotlib are imported.

This exercise is part of the course

Working with Geospatial Data in Python

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Plot the natural parks and mining site data
ax = national_parks.plot()
mining_sites.plot(ax=ax, color='red')
plt.show()

# Convert both datasets to UTM projection
mining_sites_utm = ____
national_parks_utm = ____

# Plot the converted data again
ax = national_parks_utm.plot()
mining_sites_utm.plot(ax=ax, color='red')
plt.show()
Edit and Run Code