I have a dataset containing GPS coordinates and zip codes of locations from different regions in Spain, and I need to classify them as rural or urban based on either of these two information sets (and additionally having the city/town names based on these two).

I was wondering if anyone knows if there is any mapping (from zip codes or area names to rural/urban) I can find from a known, credible source, or if there is a way to classify these locations as rural or urban on my own if I have coordinates and/or zip codes?

Maybe if anyone can point me to a source that describes how this type of classification is typically done. For example, over here there is a mention of the classification that EU uses to classify as 'predominantly urban', 'predominantly rural' and 'intermediate', but is there a simpler method?

1 Answer 1


There’s two parts to this.. assuming you have the coordinates (lat/lon)

Urban Classification

For something like this you might want to take a look at Corine Land Classification. This is a raster with a series of classifications (Dense Urban, Light Urban, Farmland, Vineyard, Water, Peat Bog…).

It’s then a matter of doing a point-to-raster sampling. You don’t mention which tools you have available, but in QGIS you could use the Point Sampling plugin. Other GIS tools should have equivalent functionality.

For an example, have a look at the recent work done by Alasdair Rae, it was done for the UK but the raster covers the whole of the EU.

For a coarse urban/rural classification, you could also look at NaturalEarthData urban areas layer.

Finding place names

Take a look at Who’s on first from Mapzen. This is web API for geolocating points to the correct urban footprint

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.