Given a TIFF file corresponding to Europe, and converted into shape contours :
gdal_contour -a elev Europe_input.tif Europe_output.shp -fl -1000 -500 -200 -50 0 50 100 200 500 1000 2000 4000 6000
Given defined area corresponting to France :
West : 005° 48' W
East : 010° E
North : 051° 30' N
South : 041° N
How to get only the features whose geometry intersects my defined area with gdal ?
Clip the raster to the area of interest with gdal_translate, e.g.:
gdal_translate -projwin ulx uly lrx lry Europe_input.tif Europe_subregion.tif
where ulx uly lrx lry
is the upper/lower x/y bounds of the area of interest in the units of Europe_input.tif
(maybe metres, maybe arcseconds, maybe degrees, I can't tell). After clipping the raster, then process Europe_subregion.tif
with gdal_contour
using the commands in your question.