[postgis-devel] [PostGIS] #2122: [raster] Real extent feature lost after metadata as views

Mateusz Loskot mateusz at loskot.net
Fri Nov 30 08:46:04 PST 2012


On 30 November 2012 16:37, Bborie Park <dustymugs at gmail.com> wrote:
> On Fri, Nov 30, 2012 at 8:28 AM, Sandro Santilli <strk at keybit.net> wrote:
>> On Fri, Nov 30, 2012 at 08:24:07AM -0800, Bborie Park wrote:
>>> On Fri, Nov 30, 2012 at 8:16 AM, Sandro Santilli <strk at keybit.net> wrote:
>>> > On Fri, Nov 30, 2012 at 08:07:57AM -0800, Bborie Park wrote:
>>> >> >
>>> >> > Couldn't (or doesn't) a constraint contain the original extent ?
>>> >> > The same information that you would have put into the raster_column field.
>>> >> >
>>> >>
>>> >> It could be done as a constraint... a constraint that does not enforce
>>> >> anything.  The problem with constraints that don't enforce anything is
>>> >> that they're static and may go out of date...
>>> >
>>> > It could also constraint: all raster tiles  must be covered bu that extent.
>>> >
>>> >> There are a whole set of constraints present...
>>> >>
>>> >> srid
>>> >> extent
>>> >
>>> > ^^^ so there's one already ?
>>>
>>> Yes. This is a constraint enforcing that all tiles are within the
>>> maximum extent for the table. A "true" data extent constraint would be
>>> something else though that would be hard to enforce due to probable
>>> performance issues.
>>
>> You could just make the test looser... no tile can be fully outside
>> the real extent, and in no way above or on the left. Can overlap on
>> the right and on the bottom, but not be fully outside.
>> Should be fast.
>
> That would be doable.  Extent constraint could be of the "true" data
> extent


Bborie,

If that is possible, then I'm all for that.

> and the check is purely an intersects test instead of within.
> This constraint would only be able to be easily set at loading time
> through raster2pgsql as doing it within the database would require
> inspecting every band of every tile.

Yes, but the raster2pgsql is the canonical client side of PostGIS Raster,
so I see no problem with that. Any third-party clients are expected to follow
it as a reference, aren't they?

>> How does the loader request regular blocking ?
>> Is there an AddRasterColumn function to call, taking care about writing
>> those constraints ?
>>
>
> raster2pgsql -t WIDTHxHEIGHT
>
> That is how to specify tiling.  There is nothing to specify regular
> blocking as regular blocking is a constraint applied later.
> Constraints are applied using AddRasterConstraints().

There is -r switch though.

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net



More information about the postgis-devel mailing list