<div dir="ltr"><div><div>> That shouldn't happen because of the return at line 453....<br></div>Damn, I missed that. :)<br><br>> Hungarian-style convention....<br></div>Yes, I've read <a href="https://trac.osgeo.org/gdal/wiki/rfc8_devguide">RFC8</a>; just thinking out loud.<br>
<br><br></div><div class="gmail_extra"><br><br><div class="gmail_quote">2014-08-21 22:21 GMT+03:00 Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le jeudi 21 août 2014 21:13:15, Nicu Tofan a écrit :<br>
> Hello Even,<br>
><br>
><br>
>    - VRTBuilder::pasDatasetProperties line 237<br>
<div class="">><br>
> DatasetProperty* psDatasetProperties<br>
><br>
> This is a variable allocated on the stack; on function entry it contains a<br>
> pointer somewhere inside pasDatasetProperties; Say pasDatasetProperties is<br>
> 0x7500000 and psDatasetProperties is<br>
> 0x7500100. Now on line pasDatasetProperties the buffer at 0x7500000gets<br>
> reallocated, possibly moving to, say, 0x90000000; psDatasetPropertiesshould<br>
> now be 0x90000100 but it is still 0x7500100 because it is stored in a<br>
> variable on the stack - namelly the argument psDatasetPropertie.<br>
><br>
> On line 457 psDatasetPropertie is used and is going to contain 0x750010. It<br>
> may not trigger an access violation because the address will probably be<br>
> inside the heap but it may generate some hard to find bugs that we all love<br>
> and cherish.<br>
<br>
</div>That shouldn't happen because of the return at line 453. But for clarity we<br>
might have a dedicated function for the processing done between line 412 and<br>
454 since it doesn't need psDatasetProperties at all.<br>
<div class=""><br>
><br>
> As a reflection of mine, this may be the result of the naming convention,<br>
> as psDataset and pasDataset look the same to our animal brains.<br>
<br>
</div>Hungarian-style convention.<br>
<br>
psXXXX is a Pointer to a single Structure<br>
pasXXXXX is a Pointer to an Array of Structure<br>
<br>
><br>
><br>
><br>
>    - Generally this is a sign of non georeferenced images...<br>
<div class="">><br>
> The bounding box becomes a bit more complicated in rotated images, too. I'm<br>
> gonna look into it.<br>
<br>
</div>Dealing with non-zero values in gt[2] and gt[4] is clearly out of scope of<br>
what a regular VRT can do (you need a warped VRT for that).<br>
Well you could still produce a regular VRT (with a rotated geotransform) if<br>
all the sources have the same rotation in their geotransform, but that's an<br>
unlikely situation.<br>
<br>
><br>
><br>
><br>
>    - GDALProxyPoolDatasetH<br>
<div class="im HOEnZb">><br>
> Got it, thanks!<br>
><br>
> Regards,<br>
> Nick<br>
><br>
> PS Forgot to reply to the list, sorry.<br>
<br>
</div><div class="HOEnZb"><div class="h5">--<br>
Spatialys - Geospatial professional services<br>
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a><br>
</div></div></blockquote></div><br></div>