I created a collection that contains a multipolygon document.
I want to write a query in spring data that tells me if a point (lon, lat) intersects the multipolygon. The query in mongoDb is as follows:
db.my_multi_polygon.find({
geometries : {
$geoIntersects : {
$geometry : {
"type" : "Point",
"coordinates" : [ 12.704157, 41.720075 ]
}
}
}
});
but I would like to understand how to translate it into Spring Data
Is it possible to write a query that returns a boolean (true = intersects, false = not intersects)?
No comments:
Post a Comment