Ticket #227 (closed task: fixed)

Opened 4 years ago

Last modified 3 years ago

[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: trunk
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

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

Change History

follow-up: ↓ 2   Changed 4 years ago by mloskot

  • owner changed from pracine to mloskot
  • status changed from new to assigned

Changed 4 years ago by jorgearevalo

in reply to: ↑ 1   Changed 4 years ago by jorgearevalo

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

  Changed 4 years ago by mloskot

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

  Changed 3 years ago by mloskot

  • summary changed from Add out-db support in gdal2wktraster.py script to [wktraster] Add out-db support in gdal2wktraster.py script

  Changed 3 years ago by pracine

  • milestone set to WKTRaster 0.1.6

  Changed 3 years ago by pracine

  • priority changed from medium to high

  Changed 3 years ago by pracine

  • owner changed from mloskot to jorgearevalo
  • status changed from assigned to new

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

  Changed 3 years ago by jorgearevalo

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

  Changed 3 years ago by jorgearevalo

  • status changed from new to assigned

  Changed 3 years ago by jorgearevalo

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.

follow-up: ↓ 13   Changed 3 years ago by 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?

  Changed 3 years ago by pracine

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   Changed 3 years ago by jorgearevalo

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.

  Changed 3 years ago by mloskot

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

  Changed 3 years ago by jorgearevalo

  • status changed from assigned to closed
  • resolution set to fixed

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.