Changes between Version 3 and Version 4 of ToleranceDiscussion


Ignore:
Timestamp:
Mar 28, 2012, 3:17:04 PM (12 years ago)
Author:
Mike Taves
Comment:

add GEOS PrecisionModel idea

Legend:

Unmodified
Added
Removed
Modified
  • ToleranceDiscussion

    v3 v4  
    3232A regular grid (like shown in the paper) would only take a size (vertical and horizontal) to share.
    3333An irregular grid (FP expanding grid?) would take an equivalent calculus to compute.
     34
     35=== GEOS !PrecisionModel ===
     36The [http://geos.refractions.net/ro/doxygen_docs/html/classgeos_1_1geom_1_1PrecisionModel.html geos::geom::PrecisionModel GEOS PrecisionModel Class] was ported from JTS to the GEOS C++ API, but there is no C API for this feature. Adding a !PrecisionModel to the GEOS functionality uses a precision grid to "snap" all coordinates, which could eliminate some rounding and robustness issues with some functions.
     37
     38The functionality can be previewed graphically with JTS !TestBuilder, in the top menu Edit > Precision Model ... For example, if you want to have millimetre tolerance, set the fixed to "1000.0", now an input geometry of `'POINT (130.111 281.999)'` will remain the same, but an input of `'POINT (130.1111 281.9999)'` will auto magically snap to `'POINT (130.111 282)'`. Other functions, such as buffer, will also have results that conform to no more than millimetre precision (three decimal places).
     39
     40In order for this functionality to be used in PostGIS, it would first need to be exposed to the GEOS C API. Secondly, PostGIS would need to somehow communicate the precision model to be used, based on some metadata. As a first pass idea, the topology extension has a few metadata tables, where a tolerance could somehow be specified. I'm not sure how it could be implemented to other geometries without a server runtime variable (e.g., [http://www.postgresql.org/docs/current/static/runtime-config-custom.html Customized Options]).