[postgis-users] Raster tile size impact results

Pierre Bails bails at getredbird.com
Fri Jun 24 09:32:28 PDT 2016


Hello,

Unfortunatly, I don't find a way to print raster results in OpenJump. Can
you explain me how I can do it ?

Thank you for your help !

Pierre

Le lun. 20 juin 2016 à 16:16, Pierre Racine <Pierre.Racine at sbf.ulaval.ca> a
écrit :

> I would try to understand, visually using OpenJump, how your tiles are
> clipped in the two cases... I guess sometimes 1 pixel wide tiles get
> clipped in a strange way.
>
> Pierre
>
> > -----Original Message-----
> > From: postgis-users [mailto:postgis-users-bounces at lists.osgeo.org] On
> Behalf
> > Of Pierre Bails
> > Sent: Wednesday, June 15, 2016 11:41 AM
> > To: postgis-users at lists.osgeo.org
> > Subject: [postgis-users] Raster tile size impact results
> >
> > Hi all,
> >
> > I'm looking for get all pixel's value in a raster insert thanks to
> raster2pgsql
> > intersect by a polygon.
> > Nevertheless, there are some things that I don't understand: depends on
> tile
> > size, I don't have the same result... The error between 2 raster is also
> correlate
> > to the pixel size (I assume it's due to the pixel number).
> >
> > Can you explain me how the tile size can influence the final result ?
> >
> > Here is the query :
> > SELECT DISTINCT SUM((px).val)
> > FROM(
> >   SELECT *
> >   FROM  mns INNER JOIN
> >
> st_setsrid(st_geomfromgeojson('{"type":"Polygon","coordinates":[[[x,y],[x,y],[x
> > ,y] ]]}'), 4326) as geom on ST_Intersects(mns.rast, geom)
> > ) AS clip, ST_PixelAsCentroids (ST_Clip(clip.rast, clip.geom),1) AS px;
> >
> >
> > DSM px size 70cm:
> > raster2pgsql -a -t 250x250 -s 4326 -F pathToDSM.tiff dsmTable (result:
> 46 347
> > 846)
> >
> > raster2pgsql -a -t 50x50 -s 4326 -F pathToDSM.tiff dsmTable    : 46 382
> 873
> > Difference: 35027
> >
> >
> > DSM px size 20cm :
> > raster2pgsql -a -t 250x250 -s 4326 -F pathToDSM.tiff dsmTable :  567 505
> 888
> >
> > raster2pgsql -a -t 50x50 -s 4326 -F pathToDSM.tiff dsmTable    : 596 897
> 610
> > Difference: 29 391 722
> >
> >
> > If we considere 250x250's result as reference, there is a difference of
> 0.07% in
> > the first case, and 5% in the second. If the polygon area increases, the
> error rate
> > increases.
> >
> > Thank you,
> >
> > Pierre
> _______________________________________________
> postgis-users mailing list
> postgis-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/postgis-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20160624/4899b34c/attachment.html>


More information about the postgis-users mailing list