Why this matters
Where something happens often explains why. Yields depend on rainfall zones and soils, clinic use depends on distance, solar demand depends on grid coverage, and carbon projects depend on land cover from satellite images. Agriculture, health, energy and climate employers in Ghana use location data, and some adverts name geospatial or remote sensing skills. This lesson is optional, but valuable if you want to work in those sectors.
Two kinds of spatial data
- Vector data: points, lines and shapes. A farm or clinic is a point with latitude and longitude; a road is a line; a district boundary is a polygon. Common file formats are GeoJSON, GeoPackage and shapefile.
- Raster data: a grid of cells, each with a value, such as satellite images, rainfall surfaces or elevation.
Coordinates and projections
Latitude and longitude are angles on a curved Earth, so you cannot measure distance in metres with them directly. A coordinate reference system (CRS) describes how coordinates map to the Earth. GPS gives coordinates in the system coded EPSG:4326. To measure distances, convert to a projected system in metres. For most of Ghana, UTM zone 30N (EPSG:32630) works; places east of the Greenwich meridian (0° longitude), including most of the Volta Region, fall in zone 31N (EPSG:32631).
Nearest clinic, in code
geopandas extends pandas with a geometry column. Here and are pandas tables of made up places near Tamale, each with and columns: