<div dir="auto">JTS already provided a mechanism to specify a precision for geometry, and this is respected by a number of operations as well (notably the overlay operations intersection et al and buffer - but not the spatial predicates, yet).  GEOS should provide this as well, or is close to doing so.  And I'm currently working on a new implementation of overlay to improve robustness, which will improve fixed precision computation as well.  <div dir="auto"><br></div><div dir="auto">The issue of handling fixed precision for predicates is a good question.  I have an algorithm in the conceptual stages for this.  But it may be difficult to make it consistent with the overlay operations on a performant way.  I intend to write up a survey of the options soon.</div><div dir="auto"><br></div><div dir="auto">My current thinking is that precision will be specified as a parameter to geometry operations.  No new type will be required. It might be nice to have precision specified in column metadata somehow, but not sure how this could work </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 3, 2019, 5:48 AM Darafei "Komяpa" Praliaskouski <<a href="mailto:me@komzpa.net">me@komzpa.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<div><br></div><div>Can you describe how the operations like Intersection should behave in such type? E.g. if you have a type with 0 decimals (say), and have a line going from (0,0) to (1,1) intersect with a line going from (1, 0) to (0, 1) - what is the intersection point that is going to be reported? Will that ST_Intersection in turn ST_Intersects=true with original point?</div><div><br></div><div>There are a number of such requests across the years but nobody seems to propose a working algebra for such type, and without it it's not going to get implemented.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 3, 2019 at 2:43 PM Giunta Igor <<a href="mailto:Igor.Giunta@tg.ch" target="_blank" rel="noreferrer">Igor.Giunta@tg.ch</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">How can a precision be assigned to a geometry, e.g. a point/line/polygon to 3 decimals, in order that any input/output will be given in that precision (without usage of rounding functions like snap2grid)<br>
How can the problem be tackeld? Shall we request to include new types? Or shall we rather let develop a new feature?<br>
<br>
I guess we are not the first users facing this problem.<br>
<br>
<br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank" rel="noreferrer">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_-2282821677236055482gmail_signature"><div dir="ltr"><div><div>Darafei Praliaskouski</div><div>Support me: <a href="http://patreon.com/komzpa" target="_blank" rel="noreferrer">http://patreon.com/komzpa</a></div></div></div></div>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org" target="_blank" rel="noreferrer">postgis-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/postgis-users" rel="noreferrer noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/postgis-users</a></blockquote></div>