Monday, 7 October 2019

geojson - mongo geoIntersects with Spring Data


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

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...