Paul,<br><br>Please check that you used the right values for XSize and YSize.<br><br><div class="gmail_quote">On Wed, Jun 22, 2011 at 6:39 PM, Paul Mallas <span dir="ltr">&lt;<a href="mailto:pmallas@rsmas.miami.edu">pmallas@rsmas.miami.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Yes, I tried this. I keep getting a segmentation fault doing it this way.<br>
<br>
I will dig further, maybe something else is not right.<br>
<br>
Regards,<br><font color="#888888">
Paul</font><div><div></div><div class="h5"><br>
<br>
On 6/17/2011 6:25 PM, Paul Mallas wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 6/17/2011 5:41 PM, Frank Warmerdam wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 11-06-17 03:23 PM, Paul Mallas wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I am trying to transpose image data (i.e., swap lines and columns)<br>
and am<br>
struggling to make it work properly. I think this should be possible<br>
through<br>
RasterIO, but so far no luck. Any suggestions?<br>
<br>
My approach so far has been like this, with image nXsize by nYsize:<br>
<br>
void *pData = VSIMalloc2(nXSize, (GDALGetDataTypeSize(eType) / 8));<br>
<br>
for (int iLine = 0; iLine &lt; nYSize; iLine++) {<br>
<br>
// Read in row (line)<br>
eErr = poSrcBand-&gt;RasterIO(GF_Read, 0, iLine, nXSize, 1, pData,<br>
nXSize, 1, eType, 0,0);<br>
<br>
// Now I want to write a column, nothing I tried here has worked<br>
eErr = poDstBand-&gt;RasterIO(GF_Write, .......<br>
</blockquote>
<br>
Paul,<br>
<br>
You should be able to write this column wise like:<br>
<br>
poDstBand-&gt;RasterIO( GF_Write, iLine, 0, 1, nXSize,<br>
pData, 1, nXSize, eType, 0, 0 );<br>
<br>
Note that this can be pretty inefficient depending on the format and<br>
how it is blocked.<br>
<br>
Best regards,<br>
</blockquote>
<br>
Hmm, I thought I tried this configuration. I will try again. Thank you<br>
for your time Frank.<br>
</blockquote>
<br>
<br>
______________________________<u></u>_________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/gdal-dev</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>