[postgis-devel] PostGIS raster feedback

dustymugs dustymugs at gmail.com
Mon Jun 20 11:41:10 PDT 2011


On 06/20/2011 10:43 AM, Pierre Racine wrote:
>> I just want to say that I definitely agree that a GDAL write driver is the way to
>> go,and then replace the python loader with a GDAL-based one in C. I wouldn't
>> want to necessarily take all of the retiling/overview logic away from the loader
>> (or at least the loader could call the SQL functions for you) because I think it may
>> be more intuitive for most people when compared to existing systems... though
>> having it all available through SQL to change the overview levels and tile sizes
>> after the load sounds great, I think most people starting out would rather just
>> give an extra parameter or two to the loader and let it do it's thing.
>
> I agree that it is very useful to have those two functionalities in the importer but I would just put the priority on having them in SQL first so we put energy in more useful functions. Once we have that, put them everywhere else you want... Having ST_Resample, ST_Clip, ST_Retile and ST_CreateOverview is way more valuable In SQL than a versatile loader since it allows you to recreate overviews and retiling AFTER many raster manipulations in the database. Right now if you manipulate your raster coverage (remove tiles, compute new raster values, etc...) you CAN'T recreate/refresh overviews for example.
>
> So in my view of good priorities:
>
> 1) Implement a basic loader
> 2) Make sure we can resample/retile in SQL
> 3) Add these functionalities to the loader
>
> If we want to retile/create overview before we get 3) we can always use the good old python loader...
>

Mark,

If you're thinking of writing a C version of raster2pgsql.py, I'd like 
to make a suggestion and build the utility against rt_core/rt_api.h so 
that you can make use of the function rt_raster_from_gdal_dataset.  The 
function will return a raster object from a GDAL dataset, which can then 
be processed, serialized and stored in the database.

This would be similar to how testapi depends upon rt_core/rt_api.h.

-bborie



More information about the postgis-devel mailing list