<div dir="ltr">Hello,<div><br></div><div>Thank you for this information. I will explicitly call Create() using a script. Is the IWriteBlock method to be tested in a similar manner? Note that pData buffer is passed to this method as an argument, which I will have to generate and pass to it. Any suggestions how I should generate this pData buffer?</div>

<div><br></div><div>Regards,</div><div>Varun Saraf</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 5, 2014 at 1:44 AM, Even Rouault <span dir="ltr"><<a href="mailto:even.rouault@mines-paris.org" target="_blank">even.rouault@mines-paris.org</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Le lundi 04 août 2014 21:38:36, Varun Saraf a écrit :<br>
<div class="">> Hello,<br>
><br>
> Yes, the code on the github repository is the latest state. I was trying<br>
> the following input queries :<br>
><br>
> (1) Assuming that my Create() will be called.<br>
> gdal_translate --debug ON -of PostGISRaster ~/GSoC/ap_clip5x5.tif<br>
>  PG:"host=localhost port=5432 user=postgres password=postgres<br>
> dbname=test123 table=newtable"<br>
><br>
> (2) When that did not work, I tried the following (suggested by my mentor,<br>
> Jorge Arevalo) which didn't work either.<br>
> gdal_translate --debug ON -of PostGISRaster -outsize 50% 50%<br>
> ~/GSoC/ap_clip5x5.tif  PG:"host=localhost port=5432 user=postgres<br>
> password=postgres dbname=test123 table=newtable"<br>
<br>
</div>gdal_translate will never call Create(), but only CreateCopy().<br>
<br>
You might want to call Create() directly with a Python script for example, or<br>
a sample C/C++ code. gdalwarp will call Create() too, but gdalwarp can<br>
potentially rewrite existing tiles, which can complicate your initial coding.<br>
<div class=""><br>
><br>
> QuiteDelete() method is called in both cases and the following error<br>
> messages are shown<br>
> ERROR 1: Couldn't drop the table public.newtable: ERROR:  table "newtable"<br>
> does not exist<br>
> ERROR 6: PostGISRasterDataset::CreateCopy() only works on source datasets<br>
> that are PostGISRaster<br>
<br>
</div>Yes, as the message implies, the current CreateCopy() implementation only<br>
works when the source dataset is a postgisraster dataset itself.<br>
As far as the error message "Couldn't drop ...",<br>
PostGISRasterDataset::Delete() should probably be more silent in case the<br>
dataset doesn't exist.<br>
<br>
Note that once you have a full feature Create() implementation (with working<br>
IWriteBlock() of course), CreateCopy() is no longer strictly needed, since<br>
there is generic implementation in GDAL core that will emulate CreateCopy()<br>
with Create() + IWriteBlock()<br>
<div class=""><br>
><br>
> I even tried calling the Create() method directly from CreateCopy(), since<br>
> that is being called, but again the same error message is being printed.<br>
><br>
> Regards,<br>
> Varun Saraf<br>
><br>
> On Mon, Aug 4, 2014 at 11:33 PM, Even Rouault<br>
> <<a href="mailto:even.rouault@mines-paris.org">even.rouault@mines-paris.org</a>><br>
><br>
> wrote:<br>
> > Le lundi 04 août 2014 14:39:52, Varun Saraf a écrit :<br>
> > >  Hi,<br>
> > ><br>
> > > Below is my eleventh weekly report.<br>
> > ><br>
> > > *What did I do this week?*<br>
> > ><br>
> > >    - There are some issues with the calling of different methods. My<br>
> ><br>
> > method<br>
> ><br>
> > >    PostGISRasterDataset::Create() is not being called. Tried to resolve<br>
> > ><br>
> > > that.<br>
> ><br>
> > Varun,<br>
> ><br>
> > If the code at<br>
> ><br>
> > <a href="https://github.com/varunsaraf/postgis_raster/blob/master/postgisrasterdat" target="_blank">https://github.com/varunsaraf/postgis_raster/blob/master/postgisrasterdat</a><br>
</div>> > aset.cpp is the latest state, I don't see any reason why your Create()<br>
<div class="HOEnZb"><div class="h5">> > method wouldn't<br>
> > be called. Do you try to trigger it directly by calling Create()<br>
> > explicetely<br>
> > or through other more high level operations ?<br>
> ><br>
> > Even<br>
> ><br>
> > > - Fixed some small bugs and removed unnecessary variables that were<br>
> > > being used.<br>
> > ><br>
> > > *What do I plan on doing next week?*<br>
> > ><br>
> > >    - Continue with testing and bug fixing.<br>
> > ><br>
> > > *Am I blocked on anything?*<br>
> > ><br>
> > >    - No.<br>
> > ><br>
> > > Link to weekly report :<br>
> > > <a href="https://github.com/varunsaraf/postgis_raster/wiki/Report-11" target="_blank">https://github.com/varunsaraf/postgis_raster/wiki/Report-11</a><br>
> > > Link to code repository : <a href="https://github.com/varunsaraf/postgis_raster" target="_blank">https://github.com/varunsaraf/postgis_raster</a><br>
> > > More details at : <a href="http://trac.osgeo.org/gdal/wiki/PostGIS_raster_driver" target="_blank">http://trac.osgeo.org/gdal/wiki/PostGIS_raster_driver</a><br>
> > ><br>
> > > Regards,<br>
> > > Varun Saraf<br>
> > > Lab for Spatial Informatics<br>
> > > IIIT Hyderabad, India<br>
> ><br>
> > --<br>
> > Geospatial professional services<br>
> > <a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
<br>
--<br>
Geospatial professional services<br>
<a href="http://even.rouault.free.fr/services.html" target="_blank">http://even.rouault.free.fr/services.html</a><br>
</div></div></blockquote></div><br></div>