[gdal-dev] GDAL Cubic Interpolation

Joaquim Luis jluis at ualg.pt
Mon Oct 9 09:32:37 PDT 2017


Alternatively,  use GMT's grdsample with -fg option to force the knowledge  
(if it's not already in the file) that the Earth is round.

http://gmt.soest.hawaii.edu/doc/5.4.2/grdsample.html



>
> Harvey,
>
>
>>
>
>> I subsampled a GLOBE image of elevation data by a subsampling factor of  
>> 12
>
>> to a resolution of 0.1 deg x 0.1 deg on integer multiples of 0.1 deg.  
>> The
>
>> original GLOBE image is: Latitude from +90-1/240 deg to -90+1/240 deg in
>
>> 1/120 deg steps, and Longitude from -180+1/240 deg to +180-1/240 deg in
>
>> 1/120 deg steps.
>
>>
>
>> I understand that the cubic interpolation method in gdalwarp accounts  
>> for
>
>> the subsampling factor, so 48x48 adjacent pixels influence the target  
>> pixel
>
>> for a subsampling factor of 12.
>
>>
>
>> Does gdalwarp assume the original image is a sphere, where 48x48  
>> adjacent
>
>> pixels influence all target pixels, or a rectangle, where a limited  
>> number
>
>> of pixels influence the target pixels at the top, bottom, left, and  
>> right
>
>> edges of the subsampled image?
>
>
> A rectangle, with fallback to bilinear resampling at edges
>
>
>> If gdalwarp assumes the original image is a
>
>> rectangle and uses a modified interpolation method at the four edges of  
>> the
>
>> subsampled image, the modified method affects two rows and two columns  
>> at
>
>> the top, bottom, left and right edges of the subsampled image. If  
>> gdalwarp
>
>> assumes the original image is a rectangle, is there a command option so
>
>> gdalwarp considers spherical wrapping when interpolating?
>
>
> Nothing directly straightforward. Your below plan is the a reasonable  
> solution.
>
>
>> Alternatively, I
>
>> assume I could augment the original GLOBE image with the appropriate
>
>> additional rows and columns on all four edges. If I did that, how do I  
>> tell
>
>> gdalwarp the extent of the augmented input image?
>
>
> You'll have to recreate a properly referenced input image, for example  
> with
>
>
> gdal_translate -ullr upperleftx upperlefty lowerleftx lowerlefty
>
>
> Even
>
>
> --
> Spatialys - Geospatial professional services
>
> http://www.spatialys.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20171009/91193957/attachment.html>


More information about the gdal-dev mailing list