PostGIS clip inaccurate

المشرف العام

Administrator
طاقم الإدارة
I have a RGB raster tiled at 128x128.I am trying to clip from a POSTGIS raster using a polygon as follows:

select ST_AsGDALRaster(rast,'GTiff') FROM (select st_union(st_clip(rast,geom)) as rast FROM scenes.rgb cross join ST_Transform(ST_GeomFromText('POLYGON(( 148.296964462160986 -28.914219626449281, 148.300054703309883 -28.892809637280056, 148.288369276810897 -28.891374636835419, 148.290750573935583 -28.87714520356819, 148.305307129311188 -28.878270936973706, 148.305323220779684 -28.892336715938328, 148.307563219233941 -28.892525982844003, 148.30733671875592 -28.893583124483161, 148.323105875277065 -28.895609384106994, 148.319860482823429 -28.917021311138011, 148.319860482823429 -28.917021311138011, 148.296964462160986 -28.914219626449281 ))',4326),32655) as geom where st_intersects(rast,geom)) as rastSee graphic, paddock bounds is black outline - image is meant to clip to this area.

My question is how can I change my query so the clipped raster matches the polygon?



أكثر...
 
أعلى