2

In Java I am using the JTS library. Is it possible to use this library to generate Voronoi sites using different types of distance functions?

https://locationtech.github.io/jts/javadoc/org/locationtech/jts/triangulate/VoronoiDiagramBuilder.html

for example *voronoi sites using Euclidean Distance:

euclidean

*voronoi sites using Manhattan Distance: ( what i want to do using JTS but dont know how ) enter image description here

  • What do you mean by different types? You mean like a spherical Voronoi? – Kirk Kuykendall Aug 22 '19 at 2:38
  • I can generate Voroni diagrams and produce Euclidean voronoi diagrams..which is the default. however i want to create Manhattan metric version – Jeryl Cook Aug 22 '19 at 13:13
  • @KirkKuykendall updated question to be more clear. – Jeryl Cook Aug 22 '19 at 13:26
  • Edited it..and its still on hold..:( – Jeryl Cook Aug 23 '19 at 1:57
  • Looks like one more vote needed to reopen. Do you have an underlying street network? If so, did you consider treating it as a graph theory problem, and assign each edge to its nearest point based on shortest path distance? – Kirk Kuykendall Aug 23 '19 at 2:34
2

The JTS Voronoi algorithm is designed to use only the Euclidean distance. And given the compexity of the underlying code, I doubt it's feasible to generalize it to other distance metrics.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.