Associating Voronoi cells with external site data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Associating Voronoi cells with external site data

Martin Davis
One thing I'm adding to the Voronoi API is to set the userData for each
computed cell Polygon to be the Coordinate of the original site point.  
This should allow easily associating the polygons with external data
that was associated with the sites. A HashMap or TreeMap on the original
site coordinates would allow data to be looked up using the saved
coordinate attached to each output Voronoi polygon.

E.g., if the sites were JUMP Features, then the site feature attributes
over to new Features for the polygons.  This saves doing a bunch of
Point-in-Polygon lookups to do the same thing.

Can anyone comment on whether this seems like a good approach?  Is this
done any differently or better in the current JUMP Voronoi code?

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Associating Voronoi cells with external site data

Stefan Steiniger
Hei Martin,

 > Can anyone comment on whether this seems like a good approach?  Is
 > this done any differently or better in the current JUMP Voronoi code?

should work.
I use the current DT/Voronoi implementation by LP Chew as Black box to
retrieve the geometries only - so assigning attributes from original
points to Voronoi polygons was done by a point in polygon test. So..
your option seems to be then faster (although I never used a HashMap so
far - so need to learn it).

thanks
stefan
_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: RE: Associating Voronoi cells with external site data

Martin Davis
Thanks for the feedback, Stefan.  Of course, your original PIP solution
will still work.

Hashmaps are seductively easy... c'mon down!

By the way, I have been doing some performance/volume tests of the
Delaunay code.  I can run 200K points in 25 sec, on a 3-yr old machine.  
So that seems pretty good, and will hopefully be able to handle a lot of
use cases.

Stefan Steiniger wrote:

> Hei Martin,
>
> > Can anyone comment on whether this seems like a good approach?  Is
> > this done any differently or better in the current JUMP Voronoi code?
>
> should work.
> I use the current DT/Voronoi implementation by LP Chew as Black box to
> retrieve the geometries only - so assigning attributes from original
> points to Voronoi polygons was done by a point in polygon test. So..
> your option seems to be then faster (although I never used a HashMap
> so far - so need to learn it).
>
> thanks
> stefan
> _______________________________________________
> jts-devel mailing list
> [hidden email]
> http://lists.refractions.net/mailman/listinfo/jts-devel
>

--
Martin Davis
Senior Technical Architect
Refractions Research, Inc.
(250) 383-3022

_______________________________________________
jts-devel mailing list
[hidden email]
http://lists.refractions.net/mailman/listinfo/jts-devel
Loading...