I want to be able to find out which country a given (lat,long) pair falls into, but I don't need this to be extremely accurate and especially coasts can be quite crude as false positive hits will be fine.

OSM maps with administrative borders such as the set from https://mapzen.com/data/borders/ come very close to what I want, but their resolution is much higher than I need so the files are a magnitude bigger than I would prefer.

Is there a way to query e.g. OSM for lower-resolution data about borders for all countries? Alternatively: is there a way to use a tool such as QGIS to simplify borders (hopefully without introducing gaps)?

I'm more than willing to put in the work if needed, but I'm not sure where I should start or which direction I should try. :)

1 Answer 1


OSM doesn't provide in itself several resolutions for the same data. If you're working with border data, you might want to use Natural Earth Data : see https://help.openstreetmap.org/questions/33489/is-is-possible-to-download-a-reduced-dataset-of-openstreetmap-which-doesnt-include-fine-zoom-levels for a detailed answer.

If you still want to work with OSM data you'll have to lower the resolution by yourself using QGIS indeed, or even more GRASS through QGIS : you'll be looking to generalize your layer's geometry while respecting the topology. This has been asked already on Stack Exchange : take a look at Generalizing polygon file while maintaining topology in QGIS? for more details.

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.