<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Jamie, Andre,<div><br></div><div>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!</div><div><br></div><div>Lucas<br><br><div><hr id="stopSpelling">Date: Tue, 14 Oct 2014 15:52:27 -0700<br>Subject: Re: [gdal-dev] Conversion from ASCII to GeoTIFF with gdalwarp: incorrect output<br>From: jaadfoo@gmail.com<br>To: lukasz.tracewski@outlook.com<br>CC: gdal-dev@lists.osgeo.org<br><br><div dir="ltr">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.<div><br></div><div><div><div>--config CENTER_LONG 180 <br></div></div></div><div><div>Upper Left  ( 176.0010322, -16.1523859) (176d 0' 3.72"E, 16d 9' 8.59"S)</div><div>Lower Left  ( 176.0010322, -18.2685614) (176d 0' 3.72"E, 18d16' 6.82"S)</div><div>Upper Right (     181.182,     -16.152) (181d10'55.25"E, 16d 9' 8.59"S)</div><div>Lower Right (     181.182,     -18.269) (181d10'55.25"E, 18d16' 6.82"S)</div></div><div><br></div><div>--config CENTER_LONG -180<br></div><div><div>Upper Left  (    -183.999,     -16.152) (183d59'56.28"W, 16d 9' 8.59"S)</div><div>Lower Left  (    -183.999,     -18.269) (183d59'56.28"W, 18d16' 6.82"S)</div><div>Upper Right (-178.8179863, -16.1523859) (178d49' 4.75"W, 16d 9' 8.59"S)</div><div>Lower Right (-178.8179863, -18.2685614) (178d49' 4.75"W, 18d16' 6.82"S)</div></div><div><br></div></div><div class="ecxgmail_extra"><br><div class="ecxgmail_quote">On Sun, Oct 12, 2014 at 1:43 PM, Lukasz Tracewski <span dir="ltr"><<a href="mailto:lukasz.tracewski@outlook.com" target="_blank">lukasz.tracewski@outlook.com</a>></span> wrote:<br><blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">


<div><div dir="ltr"><div>Hi,</div><div><br></div><div>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.</div><div><br></div><div>Here is how I do the conversion:</div><div>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</div><div><br></div><div>My ASCII files are bilevel, with 0 and 1 only.</div><div><br></div><div>Here is an example of a problematic ASCII:</div><a href="https://drive.google.com/file/d/0B46Cy3WOKgyJYVdMLWV0OGFJQ2M/view?usp=sharing" target="_blank">https://drive.google.com/file/d/0B46Cy3WOKgyJYVdMLWV0OGFJQ2M/view?usp=sharing</a><div><br></div><div>That will produce GeoTIFF with only 3 pixels in latitude:</div><div><a href="https://drive.google.com/file/d/0B46Cy3WOKgyJTnoxSHdyaUR5cWs/view?usp=sharing" target="_blank">https://drive.google.com/file/d/0B46Cy3WOKgyJTnoxSHdyaUR5cWs/view?usp=sharing</a></div><div><br></div><div>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. </div><div><br></div><div>Any ideas?</div><div><br></div><div>Cheers,</div><div>Lucas</div>                                         </div></div>
<br>_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br></blockquote></div><br></div></div></div>                                    </div></body>
</html>