When I look for intersect between circle and polygon. He finds intersect between these two, who are not visually intersected.
Everything should have the same projection ('EPSG:3857'). But I don't know how I can check the projection of each feature.
My code :
var circle = new Circle(transformedCoordinates, radius);
var circleFeature = new Feature(circle);
var circleSource = new VectorSource();
circleSource.addFeature(circleFeature);
var circleLayer = new VectorLayer({
source: circleSource
});
var features = this.neighbourhoodLayer.getSource().getFeatures();
var nisCodesInCircle = [];
var circleExtent = circleFeature.getGeometry().getExtent();
for(var i = 0; i < features.length; i ++) {
if(intersects(circleExtent, features[i].getGeometry().getExtent())) {
nisCodesInCircle.push(features[i].get('id'));
}
}
var circleExtent = circleFeature.getGeometry().getExtent();
?