[postgis-users] Help with ST_CLIP
Regina Obe
lr at pcorp.us
Fri Mar 12 20:13:09 PST 2021
> > You can speed up the intersect check by adding a functional index
> > geometry(geog) to your geography table
> How long have functional indexes been supported?
As far back as I can remember definitely in a version long EOL'd.
I remember using them with PostGIS 1.5 and earlier.
> > 3) I tend to have last arg be crop = true (you had false). If you set
to false,
> you end up with the same raster size as your original but filled up with
nulls
> there were was data. Generally not something you want.
> Ahh, silly me.
> > Try this:
> > create table gbr100x100clip
> > as
> > SELECT ST_Clip(g.rast, 1, ST_Buffer(m.geog,1)::geometry, true) as rast
> > from
> > gbr_marine_park_boundary as m
> > INNER JOIN gbr100x100 as g ON ST_Intersects(g.rast,
> m.geog::geometry);
>
> This worked a treat. Thanks, Regina (+1)!
>
> regards
>
> Simon
>
Glad it worked.
Thanks,
Regina
More information about the postgis-users
mailing list