JTS - Java Topology Suite - Calculate radius from a given point

المشرف العام

Administrator
طاقم الإدارة
From point A, I want to check if a point B is within a certain radius from A.How calculate it usindo JTS?

I tried this:

Coordinate posicaoAtual = new Coordinate(-12.974900375893823, -38.48034163207694); Localidade localidade = new Localidade(-12.976353604547635, -38.47492356986686);Geometry ponto = new GeometryFactory().createPoint(localidade.getCoordenada());Geometry pos = new GeometryFactory().createPoint(posicaoAtual);Geometry raio = ponto.buffer(100.0, 8); // HERESystem.out.println(raio.contains(pos));My doubt is to know which the distance unit from the first parameter of the buffer method?



أكثر...
 
أعلى