Opened 15 years ago

Closed 14 years ago

#227 closed task (fixed)

[wktraster] Add out-db support in gdal2wktraster.py script

Reported by: jorgearevalo Owned by: jorgearevalo
Priority: high Milestone: WKTRaster 0.1.6
Component: raster Version: master
Keywords: Cc:

Description

Attached is a patch adding support for creating out-db rasters in gdal2wktraster.py script. Please review and correct it where needed.

Attachments (1)

gdal2wktraster_outdb_support.patch (15.6 KB ) - added by jorgearevalo 15 years ago.

Download all attachments as: .zip

Change History (16)

comment:1 by mloskot, 15 years ago

Owner: changed from pracine to mloskot
Status: newassigned

by jorgearevalo, 15 years ago

in reply to:  1 comment:2 by jorgearevalo, 15 years ago

Replying to mloskot: I'm simplifying the patch. I'll post a new version ASAP

comment:3 by mloskot, 15 years ago

Jorge, that's great, thanks! So, I'm deferring review until the new version is attached. No rush!

comment:4 by mloskot, 14 years ago

Summary: Add out-db support in gdal2wktraster.py script[wktraster] Add out-db support in gdal2wktraster.py script

comment:5 by pracine, 14 years ago

Milestone: WKTRaster 0.1.6

comment:6 by pracine, 14 years ago

Priority: mediumhigh

comment:7 by pracine, 14 years ago

Owner: changed from mloskot to jorgearevalo
Status: assignednew

Now that Jorge has access to SVN he can apply the patch himself. If it's already done, please close the ticket.

comment:8 by jorgearevalo, 14 years ago

I've implemented this (function wkblify_band):

  • bandidx (band number) comes from caller method: wkblify_raster_level. 1-based index
  • the path to the external file is the same provided with the option "-r <raster_name>" when calling the loader

After this, I've commented these lines in rtpostgis.sql.in.c:

— Verify out_db
TODO: Waiting for out-db rasters
—IF ( p_out_db = true ) THEN
— RAISE EXCEPTION 'TODO: Outside database rasters not implemented yet';
— RETURN 'fail';
—END IF;

Once re-compiled, I've correctly loaded a raster with outdb support doing this. Do you think the approximation is correct? If yes, I'll finish the out-db raster reading support in GDAL, and I'll test it (this is one of my GDAL tickets: http://trac.osgeo.org/gdal/ticket/3234

comment:9 by jorgearevalo, 14 years ago

Status: newassigned

comment:10 by jorgearevalo, 14 years ago

I've just committed this change (r5102). I'm testing it by WKT Raster GDAL driver (working on it). Waiting for comments to resolve the case.

comment:11 by jorgearevalo, 14 years ago

I forgot: I think this storage method only has sense if the raster table has 1 file, of size RasterXSize, RasterYSize. What do you think?

comment:12 by pracine, 14 years ago

This storage method makes sence mostly when a big raster dataset is cut into (JPEG) tiles for a web server. The web application first grab the path to the file list and then forward the tiles directly from the file system without reading the whole tiles from the database. This is supposed to be faster…

in reply to:  11 comment:13 by jorgearevalo, 14 years ago

Replying to jorgearevalo:

I forgot: I think this storage method only has sense if the raster table has 1 file, of size RasterXSize, RasterYSize. What do you think?

Sorry, I meant 1 row. Each out-db raster has to have 1 row, of RasterXSize, RasterYSize.

comment:14 by mloskot, 14 years ago

Jorge, I haven't tested but the commit looks good to me.

Just one note, I'd suggest to remove TODO comments when a feature is completed, instead of commenting out such comment. I mean the comment in rtpostgis.sql.in.c:539

comment:15 by jorgearevalo, 14 years ago

Resolution: fixed
Status: assignedclosed

Sure. I've deleted the commented code, TODO comment included (r5103). I close the ticket for now…

Note: See TracTickets for help on using tickets.