[geos-devel] JTS perspective on typing of prepared geometries
mtnclimb at telus.net
Fri May 13 00:19:45 EDT 2011
FWIW, if JTS Geometrys were based on interfaces rather than concrete
classes, I would have defined PreparedGeometry to be an implementation
of the Geometry interface. This would have made all access uniform.
In practice I don't think it matters all *that* much, since you are
usually using PreparedGeometrys in a very deliberate, narrow way.
However, it could be useful for some forms of access - such as indexing
based explicitly on Geometry objects.
Someday I hope to release a JTS 2, which will definitely be interface-based.
On 5/12/2011 8:50 AM, Sandro Santilli wrote:
> I was thinking more of a .prep() function returning void and internally
> holding a prepared version to transparently use in all prepared-aware
> methods. This would kind of follow PostGIS use, where you actually don't
> even explicitly call the "prepare" which happens based on an heuristic
> (the second time you run a predicate on a geometry that geometry gets
> prepared). The advantage of transparency would be there's no API change
> but automatic performance improvement.
More information about the geos-devel