<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hello,</p>
<p>I am trying to create a raster file with the GeoTiff driver,
origin [0,0] and pixel size [1,-1]. To do so I used the
GDALDriver::Create(...) method with {0,1,0,0,0,-1} as
geotransform. But the created output file has no "Pixel Size" or
"Origin" metadata fields, and when I run gdalinfo the corner
coordinates are flipped along the y axis: <br>
</p>
<p>Corner Coordinates:<br>
Upper Left ( 0.0, 0.0)<br>
Lower Left ( 0.0, 512.0)<br>
Upper Right ( 512.0, 0.0)<br>
Lower Right ( 512.0, 512.0)<br>
Center ( 256.0, 256.0)<br>
</p>
<p>instead of the expected:</p>
<p>Upper Left ( 0.0, 0.0)<br>
Lower Left ( 0.0, -512.0)<br>
Upper Right ( 512.0, 0.0)<br>
Lower Right ( 512.0, -512.0)<br>
Center ( 256.0, -256.0)<br>
</p>
<p>If I use another origin, another pixel size or another driver (I
tested with the ENVI driver), the output has the "Pixel Size" and
"Origin" fields, and the coordinates are not flipped.</p>
<p>Also, if I create the geoTiff file with
GDALDriver::CreateCopy(...) on the dataset on which I used
Create(...), the output has the correct fields.</p>
<p>Is it a bug ? or am I doing something wrong here ?</p>
<p>Attached is a c++ main that reproduce the problem:</p>
<p>
</p>
<p>
<li data-sourcepos="12:1-12:79">It takes as input two filenames,
the driver name, the origin and the spacing.</li>
<li data-sourcepos="13:1-13:106">It creates a raster using the
input driver, the first filename and the method <code>GDALDriver::Create(...)</code>.</li>
<li data-sourcepos="14:1-15:0">It creates another raster using the
second filename. This raster created by copying the first
dataset using <code>GDALDriver::CreateDataset(...)</code>.</li>
</p>
<p>config: Ubuntu 16.04, GDAL 2.2.1</p>
<p>sincerely,<br>
</p>
<p>Cédric Traizet<br>
</p>
<br>
</body>
</html>