[gdal-dev] Reprojecting with gdalwarp takes too much time
Emilio de Torres Fernández
emilio.detorres at fueca.es
Mon Feb 7 04:36:37 EST 2011
Hello,
I am developing an application that works as a kind of Google Maps for
ships. Boats can't connect to internet so they have satellite images
stored in a DB and a GPS. When the captain wants to see a part of the
coast, he fixes a point on the map (or use the actual position of the
boat) and selects a zoom level in nautical miles. This zoom indicates
the radio from the point to the limit of the image.
Given the lat-long of the selected point and the zoom level, the
algorithm of the application will perform the following steps:
1. Look for the image that contains the point on the DB (PostGIS
Raster). The images are stored in GeoTIFF format.
2. Depending on the zoom, the area of interest can be contained in the
entire image or may be necessary to create a mosaic with the adjacent
images.
3. The mosaic obtained in the previous step is reprojected to azimuthal
equidistant centered at the point selected.
4. It returns the image in BMP or JPG format.
The problem that I have is that only the reprojection with gdalwarp
takes between 2 and 19 seconds. Some images takes less because they have
low resolution, 2.5-5 meters/pixel, others take more time because they
have high resolution, 15 meters/pixel. With low resoution images it's
necessary to create a mosaic to cover large areas so the time saved
reprojecting is spent creating the mosaic. With high resolution images
is not usually necessary to generate a mosaic because they cover a large
area. The point is that in one way or another it takes too much time. I
have tried changing the values of the parameters -wm,-et and
GDAL_CACHEMAX.
No images can be reprojected an stored in memory because it's needed the
center an it is obtained in real time. Is there any alternative to
gdalwarp which does the reprojection in less time? All steps above must
be taken in 1 or 2 seconds. Is it feasible to create a system like
that?
Best regards.
More information about the gdal-dev
mailing list