Exercise

Buffer around a point

Consider the city of Goma, the capital of the North Kivu province of Congo, close to the border with Rwanda. Its coordinates are 1.66°S 29.22°E (the Point is already provided in UTM coordinates as the goma variable).

How many mining sites are located within 50 km of Goma? And how much area of national park? Let's determine that using the buffer operation. Remember that distances should be expressed in the unit of the CRS (i.e. in meter in this case).

Note: if you have a boolean Series (for example as result of a spatial relationship method), then you can calculate how many True values (ie. how many geometries passed the check) by taking the sum of those booleans because in that case the True and False values will be seen as ones and zeros.

Instructions

100 XP
  • Create a buffer of 50 km around goma, and assign it to a variable goma_buffer.
  • Check which of the points of mining_sites are located within this buffer (and call this mask). Count those sites by taking the sum of the boolean mask, and print this result.
  • Calculate the intersections of the national parks with the buffer. Take the sum of the area of those intersections, and print the result in km².