1

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?

8
  • 2
    how much is too much? can you add more details of the files involved
    – Ian Turton
    Jan 5, 2018 at 10:55
  • 2
    Make a test by dissolving and perhaps also simplifying your asian_countries.shp. Is it faster then?
    – user30184
    Jan 5, 2018 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. Jan 5, 2018 at 12:34
  • @user30184 yes I will do your suggestion, but I need to wait for my first processing to finish though. =( Jan 5, 2018 at 12:35
  • 1
    in which units is your raster? that 0.0027, if in meters, may really slow your computational time down
    – Elio Diaz
    Jan 5, 2018 at 15:36

1 Answer 1

1

What I did is to download a country boundaries for asia with a lesser nodes. The country boundaries from GADM (gadm.org) has a much more details that what I got from http://thematicmapping.org/downloads/.

Here are the specific steps:

1) I downloaded the world borders dataset.

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.

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.