Jorge,<br><br>I&#39;m not aware much about the changes in the gdal2wktraster script, I can see a r4226 which may be related to the problem. Please consult with the author Mateusz Loskot about the possible reasons you&#39;ve encountered with the script.<br>
<br>I&#39;ll be trying to reproduce your appcrash and gather further information abot the details soon.<br><br>Best regards,<br><br>Tamas<br><br><br><br><div class="gmail_quote">2009/7/4 Jorge Arévalo <span dir="ltr">&lt;<a href="mailto:jorge.arevalo@gmail.com">jorge.arevalo@gmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hello,<br><br>I have two versions of GDAL in my machine:<br><br>- GDAL 1.7.0 from SVN<br>- GDAL 1.7.0 with the WKT Raster driver I&#39;m developing<br>
<br>Today, I&#39;ve updated the wktraster code from svn. I have the revision 4256. The last one. With this revision, there is a new version of gdal2wktraster script. <br>

<br>I loaded this image <a href="ftp://ftp.remotesensing.org/geotiff/samples/gdal_eg/cea.tif" target="_blank">ftp://ftp.remotesensing.org/geotiff/samples/gdal_eg/cea.tif</a> with and old version of gdal2wktraster, that allowed GDAL to select the block size for the tiles. Then, I could load the image with default tiles of 514x15, 35 tiles. <br>


<br>But with the new version of the script, I have to specify the block size by hand. For example, 514x15 (or 100x100). When I try this:<br><br>gdal2wktraster.py -r cea.tif -t table_name -s 4267 -b 1 -k 514x15 -I -M -o output.sql -v<br>


<br>I get this error:<br><br>ERROR 7: Assertion `FALSE&#39; failed<br>in file `gdaldrivermanager.cpp&#39;, line 309<br><br>Reviewing the code, I saw that the last script&#39;s instruction called is:<br><br>pixels = band.ReadAsArray(xoff, yoff, valid_read_block_size[0], valid_read_block_size[1],<br>


                                  target_block_size[0], target_block_size[1])<br><br>That, somehow, should call the method &quot;GDALDriverManager::RegisterDriver( GDALDriver * poDriver )&quot; from gdalmanager.cpp. The code of the method is this:<br>


<br>int GDALDriverManager::RegisterDriver( GDALDriver * poDriver )<br>{<br>    CPLMutexHolderD( &amp;hDMMutex );<br><br>/* -------------------------------------------------------------------- */<br>/*      If it is already registered, just return the existing           */<br>


/*      index.                                                          */<br>/* -------------------------------------------------------------------- */<br>    if( GetDriverByName( poDriver-&gt;GetDescription() ) != NULL )<br>


    {<br>        int             i;<br><br>        for( i = 0; i &lt; nDrivers; i++ )<br>        {<br>            if( papoDrivers[i] == poDriver )<br>            {<br>                return i;<br>            }<br>        }<br>


<br>        CPLAssert( FALSE ); // -------&gt; THE LINE THAT CAUSES THE CRASH *******************************************<br>    }<br>    <br>/* -------------------------------------------------------------------- */<br>

/*      Otherwise grow the list to hold the new entry.                  */<br>
/* -------------------------------------------------------------------- */<br>    papoDrivers = (GDALDriver **)<br>        VSIRealloc(papoDrivers, sizeof(GDALDriver *) * (nDrivers+1));<br><br>    papoDrivers[nDrivers] = poDriver;<br>


    nDrivers++;<br><br>    if( poDriver-&gt;pfnCreate != NULL )<br>        poDriver-&gt;SetMetadataItem( GDAL_DCAP_CREATE, &quot;YES&quot; );<br>    <br>    if( poDriver-&gt;pfnCreateCopy != NULL )<br>        poDriver-&gt;SetMetadataItem( GDAL_DCAP_CREATECOPY, &quot;YES&quot; );<br>


<br>    int iResult = nDrivers - 1;<br><br>    return iResult;<br>}<br><br>So, basically, with the base 1.7.0 version of GDAL, I can load the TIFF file. With my version, crash in the previous method. Clearly, it&#39;s my driver&#39;s problem, but I don&#39;t know why. I have a test code to create a dataset using my driver and works... Why could the application crash when trying to list the registered drivers while loading a TIFF file? I have the TIFF driver loaded in my GDAL version.<br>


<br>Thanks in advance,<br><br>Best regards<br>Jorge<br clear="all"><br><a href="http://www.brainyquote.com/quotes/authors/p/paula_poundstone.html" target="_blank">Paula Poundstone</a>  - &quot;I don&#39;t have a bank account because I don&#39;t know my mother&#39;s maiden name.&quot;
<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>