Opened 15 years ago

Closed 15 years ago

#3060 closed defect (fixed)

gdalwarp very slow

Reported by: ysiddiqui Owned by: warmerdam
Priority: normal Milestone:
Component: Utilities Version: svn-trunk
Severity: normal Keywords: CUTLINE_ALL_TOUCHED gdalwarp
Cc:

Description

Running gdalwarp from one identical file to another with a cutline, the process bogs down before 10%. The process was left to run all weekend, and it only got to just below 30%. The following is the command that was used:

C:\apps\OSGEO4W\apps\gdal-dev\bin\gdalwarp -order 1 -wo "CUTLINE_ALL_TOUCHED=YES" -r near -cutline E:/POPS/temp/req30598_aoi.shp -cblend 0 E:\POPS\temp\piece1423858_temp0.tif E:\POPS\temp\piece1423858_temp1.tif

The AOI and gdalinfo reports for each of the files is attached. The image files can be found at the following FTP site:

  Site: ftp.i3.com
  Login: fwarmerdam
  Password: coreopsis
  Filename: piece1423858.zip

Attachments (3)

req30598_aoi.zip (1.1 KB ) - added by ysiddiqui 15 years ago.
cutline shapefile
gdalinfo_piece_1423858_temp0.txt (1.5 KB ) - added by ysiddiqui 15 years ago.
gdalinfo 0
gdalinfo_piece_1423858_temp1.txt (1.5 KB ) - added by ysiddiqui 15 years ago.
gdalinfo 1

Download all attachments as: .zip

Change History (6)

by ysiddiqui, 15 years ago

Attachment: req30598_aoi.zip added

cutline shapefile

by ysiddiqui, 15 years ago

gdalinfo 0

by ysiddiqui, 15 years ago

gdalinfo 1

comment:1 by warmerdam, 15 years ago

Component: defaultUtilities
Keywords: CUTLINE_ALL_TOUCHED gdalwarp added
Status: newassigned
Version: unspecifiedsvn-trunk

I have succeeded in reproducing this problem I observe that the warp runs in less than a minute if CUTLINE_ALL_TOUCHED is false and the debugger tells me things are hung up in rasterization code. So there is clearly some sort of bug in the all_touched code.

Digging.

comment:2 by warmerdam, 15 years ago

The problem related to asymmetric rounding of values at zero and resulted in the line rasterization algorithm taking extremely small steps. Corrected in trunk (r17384). I'm rebuilding the gdal-dev package for OSGeo4W now.

comment:3 by warmerdam, 15 years ago

Resolution: fixed
Status: assignedclosed

The gdal-dev package in OSGeo4W has been upgraded with the fix, though I have not actually retested it in that context. Please reopen if a problem persists.

Note: See TracTickets for help on using tickets.