[postgis-users] PostGIS new geometry type with defined precision?

Giunta Igor Igor.Giunta at TG.CH
Wed Jul 3 08:16:40 PDT 2019


Hi Darafei and Paul
thanx for your feedback. I see your points for those "clinical cases", but let me answer like this:


1)      concernig bugous intersection: the result will always be uncertain beyond resolution. Consider the same situation with 10 digit resolution. you won't be able to say which one among the 4 pixel around the matematical point is the right one. Fortunately at this scale it doesn't matter for most GIS-applications, but in principle it WILL for some (e.g. at the CERN in Geneva, where the alignement scales goes from km down to nanometers).

2)      concerning bugous distance: beyond the resolution *per definition* you may not speak about distinct points; it thenmakes no sense to measure their distance.

3)      floatings numbers are always stored as integers on the disk…




Von: postgis-users <postgis-users-bounces at lists.osgeo.org> Im Auftrag von Paul Ramsey
Gesendet: Mittwoch, 3. Juli 2019 16:35
An: PostGIS Users Discussion <postgis-users at lists.osgeo.org>
Betreff: Re: [postgis-users] PostGIS new geometry type with defined precision?

Also, what are the results of ST_Distance() when the distance is < tolerance? Zero? Tolerance?
Basically tolerance is a cross-cutting concern that affects almost every function in the system, sometimes in ways that ordinary users might consider “surprising” or “counter intuitive”. Our current “as much precision as we can take” system still has wonderful corner cases since we don’t actually have infinite precision at our command: the results of ST_Intersection(A, B) does not necessarily ST_Intersects() A or B.
The new overlay work in GEOS requires explicit precision, so we are going to start inching in that direction over time. Until then, enforcing precision on insert/update with triggers is not the end of the world if you want command of your precision model.
ATB,
P


On Jul 3, 2019, at 5:47 AM, Darafei Komяpa Praliaskouski <me at komzpa.net<mailto:me at komzpa.net>> wrote:

Hi,

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?

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.

On Wed, Jul 3, 2019 at 2:43 PM Giunta Igor <Igor.Giunta at tg.ch<mailto:Igor.Giunta at tg.ch>> wrote:
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)
How can the problem be tackeld? Shall we request to include new types? Or shall we rather let develop a new feature?

I guess we are not the first users facing this problem.


_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org<mailto:postgis-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/postgis-users


--
Darafei Praliaskouski
Support me: http://patreon.com/komzpa
_______________________________________________
postgis-users mailing list
postgis-users at lists.osgeo.org<mailto:postgis-users at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/postgis-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20190703/70c49afa/attachment.html>


More information about the postgis-users mailing list