[gdal-dev] Conversion from ASCII to GeoTIFF with gdalwarp: incorrect output

Lukasz Tracewski lukasz.tracewski at outlook.com
Thu Oct 16 10:33:35 PDT 2014


Jamie, Andre,
Many thanks for your help and explaining what is happening. I followed Jamie's suggestion (which seemed easiest, since I am a beginner in GIS) and used CENTER_LONG config argument. Worked perfectly!
Lucas

Date: Tue, 14 Oct 2014 15:52:27 -0700
Subject: Re: [gdal-dev] Conversion from ASCII to GeoTIFF with gdalwarp: incorrect output
From: jaadfoo at gmail.com
To: lukasz.tracewski at outlook.com
CC: gdal-dev at lists.osgeo.org

I would use the CENTER_LONG config argument.  That will extend the raster past the -180/180 boundary depending on which side you want to extend.
--config CENTER_LONG 180 
Upper Left  ( 176.0010322, -16.1523859) (176d 0' 3.72"E, 16d 9' 8.59"S)Lower Left  ( 176.0010322, -18.2685614) (176d 0' 3.72"E, 18d16' 6.82"S)Upper Right (     181.182,     -16.152) (181d10'55.25"E, 16d 9' 8.59"S)Lower Right (     181.182,     -18.269) (181d10'55.25"E, 18d16' 6.82"S)
--config CENTER_LONG -180
Upper Left  (    -183.999,     -16.152) (183d59'56.28"W, 16d 9' 8.59"S)Lower Left  (    -183.999,     -18.269) (183d59'56.28"W, 18d16' 6.82"S)Upper Right (-178.8179863, -16.1523859) (178d49' 4.75"W, 16d 9' 8.59"S)Lower Right (-178.8179863, -18.2685614) (178d49' 4.75"W, 18d16' 6.82"S)

On Sun, Oct 12, 2014 at 1:43 PM, Lukasz Tracewski <lukasz.tracewski at outlook.com> wrote:



Hi,
I have a few thousands of ESRI ASCII rasters in World_Mollweide (EPSG:54009) projection, which I need to convert to GeoTIFF. Usually it goes fine, but there are certain special cases that resist peaceful conversion. They are all placed on Fiji, which is special in a sense being on very border of a world's map. Problem is that in those cases somehow output is completely messed up, with incorrect resolution.
Here is how I do the conversion:gdalwarp -s_srs '+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m no_defs' -t_srs EPSG:4326 -co NBITS=1 -co COMPRESS=CCITTRLE -co PHOTOMETRIC=MINISWHITE -ot Byte $ascfile $newname
My ASCII files are bilevel, with 0 and 1 only.
Here is an example of a problematic ASCII:https://drive.google.com/file/d/0B46Cy3WOKgyJYVdMLWV0OGFJQ2M/view?usp=sharing
That will produce GeoTIFF with only 3 pixels in latitude:https://drive.google.com/file/d/0B46Cy3WOKgyJTnoxSHdyaUR5cWs/view?usp=sharing
Thing is if I crop the ASCII in QGIS to include only left side of the image, then it's fine. If I take the right side, then again I get incorrect output. 
Any ideas?
Cheers,Lucas 		 	   		  

_______________________________________________

gdal-dev mailing list

gdal-dev at lists.osgeo.org

http://lists.osgeo.org/mailman/listinfo/gdal-dev

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20141016/2fca32fb/attachment-0001.html>


More information about the gdal-dev mailing list