Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

207
Vistas
How to find all circles that have their center in their intercection a main circle

Is there a clean way to find all the circles that are not only intersection with a main circle but also have their center inside the intersection with that main circle.

enter image description here

over 4 years ago · Santiago Trujillo
2 Respuestas
Responde la pregunta

0

Sure it's simple. You need to use @@ or center to get the center point and then @> to use contains.

SELECT
  x AS r_value,
  circle('0,0', x) @> @@ circle('2,3', 1) AS contains
FROM generate_series(1,5) AS gs(x);

-or-

SELECT
  x AS r_value,
  circle('0,0', x) @> center(circle('2,3', 1)) AS contains
FROM generate_series(1,5) AS gs(x);

This brute-force tests circles with the center at the origin, with a radius of [1,5] whether they contain the center of circle('2,3',1).

See the docs on geometry functions for more info.

over 4 years ago · Santiago Trujillo Denunciar

0

select * from circles a , circles b
 where st_intersects(a.geom,st_centroid(b.geom)) 

Also, you can filter the results by adding condition in where clause. I am assuming main circle name.

select * from circles a , circles b
 where st_intersects(a.geom,st_centroid(b.geom))  and a.circle_name = 'Main Circle';
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda