Changes between Initial Version and Version 1 of PreparedGeometry

Nov 18, 2008 10:30:59 AM (9 years ago)

the prepared geometry feature


  • PreparedGeometry

    v1 v1  
     1= Prepared Geometry =
     3Version: ?
     5Source: [source:trunk/source/headers/geos/geom/prep]
     7== Description ==
     9From [ Martin Davis]:
     11A common usage pattern for JTS spatial operations (in particular, predicates such as intersects and contains, and overlay operations such as intersection and union) involves the operation being invoked between a single target geometry and a batch of test geometries. For instance, this occurs in queries in a spatial database such as PostGIS, where each geometry in the driving table interacts with a set of nearby geometries via the required operation. By taking advantage of the fact that the target geometry does not change, it is possible to significantly reduce the overall execution cost of the operation. Information such as an index on the line segments in the target geometry can be computed once and cached for reuse with all of the test geometries.
     13In order for this to work, the calling code must be able to indicate that the operation is being invoked in a batch setting. The standard JTS Geometry API doesn't allow differentiating this case, so the new concept of PreparedGeometry has been developed. (This name intentionally echoes the concept of prepared statement in SQL API's, which implements the same strategy.) Creating a PreparedGeometry on a target Geometry enables precomputation of various data structures, which then allows subsequent operations to be evaluated with maximum efficiency.
     15== Links ==
     17 *
     18 *
     20== Tickets ==
     22[ Search for "prepared geometry"]