<div dir="ltr">Thanks a lot<div>Thats useful and encouraging!</div><div>I have not implemented CreateCopy -. Ive not looked to closely at gdal_translate, but if CreateCopy is not available will it fall back on Create and the write methods or is this a likely cause of errors? From first impressions it looks like CreateCopy is not entirely necessary - mostly a shortcut when writing a whole dataset to another, but I've not looked closely at it yet.</div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 30 March 2016 at 16:36, Even Rouault-2 [via OSGeo.org] <span dir="ltr"><<a href="/user/SendEmail.jtp?type=node&node=5258885&i=0" target="_top" rel="nofollow" link="external">[hidden email]</a>></span> wrote:<br><blockquote style='border-left:2px solid #CCCCCC;padding:0 1em' class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">

        Le mercredi 30 mars 2016 17:17:11, jramm a écrit :
</span><span class=""><div><div class='shrinkable-quote'><br>> Hi
<br>> I am implementing a write driver for the Vertical Mapper/Northwood Grid
<br>> format (NWT_GRD), which already has read support.
<br>> I have attached a diff of what I have got so far. Needless to say, it is
<br>> not complete or working :D.
<br>> 
<br>> I'm looking for information on development, specifically:
<br>> 
<br>> - Precisely what functions need to be implemented so the writing is fully
<br>> supported? (i.e. the minimum to be able to create a dataset from scratch
<br>> and write data to it using RasterIO).
</div></div></span><span class="">What you implemented in your patch looks good : IWriteBlock, SetGeoTransform, 
<br>SetProjectionRef, Create.
<br>With that, you can have full "dynamic creation" (as named in 
<br><a href="http://gdal.org/gdal_drivertut.html#gdal_drivertut_creation" rel="nofollow" link="external" target="_blank">http://gdal.org/gdal_drivertut.html#gdal_drivertut_creation</a> ), thus allowing 
<br>it to be used as the target of gdalwarp for example.
<br><br></span><span class="">> - Is there any info out there on debugging GDAL drivers? What is the
<br>> standard approach. Currently im trying to use 'gdal_translate' as a way in
<br>> to get it to do something so I can set some break points...perhaps writing
<br>> a little test program would be a better method.
<br><br></span><span class="">Using gdal_translate is a reasonable way to test & debug write support. When 
<br>used without any particular arguments, it's mostly a wrapper of CreateCopy().
<br><br></span><span class="">> Which brings me to
<br>> - What standards are there for writing unit tests, test programs? I can see
<br>> a load of python under 'autotest' which im not familiar with. Are there any
<br>> guidelines on thise (the README is none too helpful).
<br><br></span><span class="">Not really. Generally looking at existing tests should give you a good idea of 
<br>how to extend. The basic is to add a method that returns 'success' or 'fail' 
<br>strings, and to add it to the gdaltest_list array.
<br><br>The gdaltest class has GDALTest() and testCreateCopy() methods that make it 
<br>generally easy to test write support. Have a look at autotest/gdrivers/bt.py 
<br>for example.
<br><br>I guess you found the existing tests for NWG_GRD are in 
<br>autotest/gdrivers/nwt_grd.py
<br></span><div><br>> 
<br><span class="">> Ive been over the driver implementation tutorial a number of times but info
<div class='shrinkable-quote'><br>> on implementing write support is fairly scant. I'd happily add to this if I
<br>> can get this done..
<br>> 
<br>> Thanks for any help
<br>> grddataset_diff.txt
<br>> <<a href="http://osgeo-org.1560.x6.nabble.com/file/n5258855/grddataset_diff.txt" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/file/n5258855/grddataset_diff.txt</a>>
<br>> 
<br>> 
<br>> 
<br>> --
<br>> View this message in context:
<br>> <a href="http://osgeo-org.1560.x6.nabble.com/Implementing-write-support-for-GDAL-dr" rel="nofollow" link="external" target="_blank">http://osgeo-org.1560.x6.nabble.com/Implementing-write-support-for-GDAL-dr</a></div></span>> iver-tp5258855.html Sent from the GDAL - Dev mailing list archive at
<br><span class="">> Nabble.com.
<br>> _______________________________________________
<br>> gdal-dev mailing list
<br></span>> <a href="http:///user/SendEmail.jtp?type=node&node=5258858&i=0" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br>> <a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a></div><span class=""><br>-- 
<br>Spatialys - Geospatial professional services
<br><a href="http://www.spatialys.com" rel="nofollow" link="external" target="_blank">http://www.spatialys.com</a><br></span>_______________________________________________
<br>gdal-dev mailing list
<br><a href="http:///user/SendEmail.jtp?type=node&node=5258858&i=1" rel="nofollow" link="external" target="_blank">[hidden email]</a>
<br><a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" rel="nofollow" link="external" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a>

        
        
        
        <br>
        <br>
        <hr noshade size="1" color="#cccccc">
        <div style="color:#444;font:12px tahoma,geneva,helvetica,arial,sans-serif">
                <div style="font-weight:bold">If you reply to this email, your message will be added to the discussion below:</div>
                <a href="http://osgeo-org.1560.x6.nabble.com/Implementing-write-support-for-GDAL-driver-tp5258855p5258858.html" target="_blank" rel="nofollow" link="external">http://osgeo-org.1560.x6.nabble.com/Implementing-write-support-for-GDAL-driver-tp5258855p5258858.html</a>
        </div>
        <div style="color:#666;font:11px tahoma,geneva,helvetica,arial,sans-serif;margin-top:.4em;line-height:1.5em">
                
                To unsubscribe from Implementing write support for GDAL driver, <a href="" target="_blank" rel="nofollow" link="external">click here</a>.<br>
                <a href="http://osgeo-org.1560.x6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml" rel="nofollow" style="font:9px serif" target="_blank" link="external">NAML</a>
        </div></blockquote></div><br></div>


        
        
        
<br/><hr align="left" width="300" />
View this message in context: <a href="http://osgeo-org.1560.x6.nabble.com/Implementing-write-support-for-GDAL-driver-tp5258855p5258885.html">Re: Implementing write support for GDAL driver</a><br/>
Sent from the <a href="http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html">GDAL - Dev mailing list archive</a> at Nabble.com.<br/>