# gdalwarp takes too much time to run

I have 300 m resolution ESA Land cover raster that I want to clip using the shapefile of Asia. (The shapefile has a border for each country, so therefore not dissolved).

Now I ran this modified code in the clipper:

gdalwarp -q -cutline /data/Forest_Extent_Asia_pacific_Ocean_Threats/asian_countries.shp -tr 0.00277777777778 0.00277777777778  -dstalpha -crop_to_cutline
-of GTiff /data/Forest_Extent_Asia_pacific_Ocean_Threats/glob_cover.tif /data/Forest_Extent_Asia_pacific_Ocean_Threats/glob_cover_v2.tif


My question is, why does it takes too much time to finish the gdal processing? Is there a bug that caused it?

• how much is too much? can you add more details of the files involved – Ian Turton Jan 5 '18 at 10:55
• Make a test by dissolving and perhaps also simplifying your asian_countries.shp. Is it faster then? – user30184 Jan 5 '18 at 11:14
• @IanTurton I'm expecting it to finish in 30 min. to one hour, but now I estimated that it would take an overnight for it to finish. I also experienced when clipping vectors, with the input vector with more than 500 features. – brentiemapper Jan 5 '18 at 12:34
• @user30184 yes I will do your suggestion, but I need to wait for my first processing to finish though. =( – brentiemapper Jan 5 '18 at 12:35
• in which units is your raster? that 0.0027, if in meters, may really slow your computational time down – Elio Diaz Jan 5 '18 at 15:36

Here are the specific steps:

2) Specified only the Asian countries using query builder.

3) Dissolved the country boundaries and saved it as another shapefile.

4) Merged the shapefile in number three with Taiwan (since in country boundary dataset, Taiwan feature is missing).

5) Re-run the gdal code above using the final shapefile in number 4.