[postgis-users] pixels vs geometries : a problem of accuracy ?

Hugues François hugues.francois at irstea.fr
Tue Jul 16 13:03:06 PDT 2013


Hello,

Below, you have links to screenshots which explain my problem much clearly than I could do it.

=> On the first one, you can see in orange the upper side of two pixels which seem to be jointive : http://huguesfrancois38.free.fr/first.jpg

=> On the second one, you can see in purple the result of their union which show a gap between the same pixels : http://huguesfrancois38.free.fr/second.jpg

=> And, finally on the last one, you can see the whole area I try to union when I select pixels from my dem raster with its vertical slices : http://huguesfrancois38.free.fr/lastone_wholearea.jpg

To give you full information, this dem was originally projected in WGS84 with numerous bil/hdr files from which I made a VRT using gdal and reproject, using gdal_wrap in Lambert93 (i.e. RGF93 or SRID 2154).

The difference between the pictures first and second, is the way I display them in OpenJump : for first.jpg, results from (ST_PixelsAsPolygons()).geom are stored in a geometry column in a table before their union and in second.jpg I directly query for (ST_PixelsAsPolygons()).geom for some tiles in OpenJump (the orange strip at the bottom come from 5 different 100x100 tiles).

Since, the gaps appear when I zoom to the accuracy of 50nm (yes, nm, not mm), I assume this is an accuracy problem when pixels' geometries are stored in a table. 

Does someone can confirm this ? Why do these gaps appear only vertically ?

The only solution I see at this point is to dump the resulting union and to union dumped geom with a very little buffer to have a single polygon and not multi one with numerous slices but any other idea is welcome !

Regards,

Hugues.


More information about the postgis-users mailing list