Re: [gdal-dev] Gdal_warp -r sum not working a expected

2022-07-04 Thread Javier Jimenez Shaw
That seems to be something wrong in the algorithm or configuration, as it is not "ignoring" the pixels with nodata value. Could you dump the output of "gdalinfo" of the original file, and the exact command line you are using with gdalwarp ? .___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ... ._

Re: [gdal-dev] Gdal_warp -r sum not working a expected

2022-07-04 Thread Ainslie Johnstone
Hi All, Thanks for your comments. I replaced the no data value (which previously was -200) with zero and then it all seemed to work! Best wishes, Ainslie > On 1 Jul 2022, at 20:39, Andrew C Aitchison wrote: > > On Fri, 1 Jul 2022, Ainslie Johnstone wrote: > >> Hi there, >> >> I am trying

Re: [gdal-dev] Gdal_warp -r sum not working a expected

2022-07-01 Thread Andrew C Aitchison
On Fri, 1 Jul 2022, Ainslie Johnstone wrote: Hi there, I am trying to downsample a high-resolution file of gridded population estimates (1km res over the whole world). I want the downsampled version to give the total population in the new lower-resolution grid. However, whenever I downsample us

[gdal-dev] Gdal_warp -r sum not working a expected

2022-07-01 Thread Ainslie Johnstone
Hi there, I am trying to downsample a high-resolution file of gridded population estimates (1km res over the whole world). I want the downsampled version to give the total population in the new lower-resolution grid. However, whenever I downsample using gdalwarp -r sum, I don’t seem to be gett

RE: [gdal-dev] gdal_warp

2010-06-21 Thread John Donovan
I've got a slightly older version of the data you're using (OS 10k B&W, but with 2 bits per pixel rather than four), and I've used a two-stage process to achieve what you want. First, I used gdal_translate to expand the image to 8-bit greyscale: gdal_translate -co "TFW=YES" -co "TILED=YES" -expan

Re: [gdal-dev] gdal_warp

2010-06-18 Thread Rob
Thanks for the replies so far, but I'm obviously missing a trick as it doesnt seem to be working. The gdalinfo on my TIF looks like this. E:\rasters>gdalinfo tq00ne.tif Driver: GTiff/GeoTIFF Files: tq00ne.tif tq00ne.tfw Size is 7874, 7874 Coordinate System is `' Origin = (505000.00

Re: [gdal-dev] gdal_warp

2010-06-18 Thread Chaitanya kumar CH
Rob, You can try the -dstalpha option in gdalwarp to create an alpha band. ( http://www.gdal.org/gdalwarp.html) On Fri, Jun 18, 2010 at 7:22 PM, Rob wrote: > Hi Guys > > I'm reprojecting some rasters from OSGB (EPSG:27700) to WGS84 (EPSG:4326) > and am running into a problem. > > The rasters ar

[gdal-dev] gdal_warp

2010-06-18 Thread Rob
Hi Guys I'm reprojecting some rasters from OSGB (EPSG:27700) to WGS84 (EPSG:4326) and am running into a problem. The rasters are reprojecting nicely, but I am left with black pixels around the image where the reprojected image doesnt fit squarely within the rectangular dimensions of the file. I