Convert and subset kml file of tiles

Jan suggested using this file to identify tiles:
ref Display grid of granules
(btw, this link is not working today)

This is a worlwide kml file.
Thanks to Stefan Keller (author of Geoconverter
I know now about the -skipfailures -nlt polygon options of ogr2ogr so that
we can use gdal utility ogr2ogr to convert and subset this file.

To convert to shapefile use

ogr2ogr -f "ESRI Shapefile" -skipfailures -nlt polygon S2Atiles S2A_OPER_GIP_TILPAR_MPC__20151209T095117_V20150622T000000_21000101T000000_B00.kml

You get 2 shapefiles within S2Atiles folder: Features and Info
As far I can tell, Info is empty

In the following way, you get just Features renamed to S2Atiles:

ogr2ogr -f "ESRI Shapefile" -skipfailures -nlt polygon -nln S2Atiles S2Atiles S2A_OPER_GIP_TILPAR_MPC__20151209T095117_V20150622T000000_21000101T000000_B00.kml

Ignore the error (it tells that layer S2Atiles cannot overwritten with the contents of Info, which is ok)
It would be neater selecting layer Features with -geomfile, but it did not work and it is irrelevant for us

To convert and subset, i.e. for the Iberian Peninsula:

ogr2ogr -f "ESRI Shapefile" -skipfailures -spat -10 30 5 45 -nlt polygon -nln IberiaS2Atiles IberiaS2Atiles S2A_OPER_GIP_TILPAR_MPC__20151209T095117_V20150622T000000_21000101T000000_B00.kml