Hi Martin, > i hadn't realized that you wanted the distance *within* the sector.
My fault - I didn't spell it out clearly in my first post. > You > can't use the regular Geometry.distance(Point) method for this, of course. > I'd think about implementing a custom Sector.distance(Geometry) algorithm, > which computes the distance via a scan of the polygon segments. Yep, sounds good. > One potential issue I just thought of is that the STRtree NN algorithm > relies on the envelope-envelope distance being a "consistent proxy" with the > actual distance between the geometry and the query geometry (the point). > However, I think this is still the case with the Sector distance, so that > should be fine. Hmm... but if "consistent proxy for" means something like "has the same rank order as" won't there be a problem ? > Not sure about the idea of cutting up the polygons and then using > PreparedGeometry. Cutting them up will probably speed things up, although > don't you then have to "reduce" the set of distances for a single polygon to > find the minimum? Luckily no. All I need is the minimum distance within sector from a point to any boundary. > And if you use the special-purpose distance and > intersects tests I propose above, then I don't think that PreparedGeometry > is needed? Right - cool ! I had imagined that I'd be doing intersections as per previous messages, hence the idea of using PreparedGeometry. Michael ------------------------------------------------------------------------------ Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk _______________________________________________ Jts-topo-suite-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jts-topo-suite-user
