Uh oh!
There was an error while loading. Please reload this page.
PC_Envelope : testing, degenerate cases, PC_Envelope_AsBinary - #104
PC_Envelope : testing, degenerate cases, PC_Envelope_AsBinary#104mbredif wants to merge 3 commits into
Conversation
mbredif
commented
Jun 7, 2016
pramsey
commented
Jun 7, 2016
I feel OK about the implementation. I worry that the concept might cause people problems. The nice thing about "ad hoc perturbations" on polygons is that the result of running PC_Envelope() on a set of patches is a nice uniform set of polygons. So for GIS applications, which like uniform types, it's easy to write a query that creates a layer that is immediately usable in a visualization tool. I'm not sure I like breaking that concept, even in order to provide more precise results. My assumption was that people would be using these envelopes mostly for visualization or queries where perfect precision was not required. What use case did you have where that assumption was wrong? |
It is a matter of taste, but I feel that getting the precise result and coercing it to a polygon if need be is much more explicit. It is also more aligned with http://postgis.net/docs/ST_Envelope.html. Is that a bad design choice in PostGIS? As a side note, the perturbation in https://github.com/mbredif/pointcloud/blob/4aaa8ca0d7cb2569c3bd064a330def3a1dedfce8/pgsql/pc_pgsql.c#L950-L951 was not taken into account as the generated geometry relies on |
mbredif
commented
Feb 13, 2017
Closing in favor of upcoming smaller and more focused PRs. |
Features
Issues
pc_bounds_to_wkbfunction so that it may be tested, leaving only the serialization relevant code in thepgsqldirectory. A test has been added (valgrind is not able to catch the wrongly sized memset issue though).PC_Envelope(pcpatch) : wkb->PC_Envelope_AsBinary(pcpatch) : wkbgeometry(pcpatch) : geometry->PC_Envelope(pcpatch) : geometry