Not within, spatial Relationship

312
0
02-11-2019 03:56 AM
MatthieuThery1
Occasional Contributor

Hello,

I am trying to query all the points in my feature Layer that don't intersect a polygon geometry.

I am wondering what is the best way to do that. (I'd like an api solution if possible, otherwise I guess I could query all the ones that do intersect, and substract them from the entire dataset)

I tried using "relate" as spatial relationship and "FF*FF****" as a parameter. It fails, and bring me a "timeout" error. (I tried and some other parameters do work). My layer has around 50k features, and the polygon intersects around 800 features.

var query = featureLayer.createQuery();
query.returnGeometry = true;
query.outFields = ["*"];
query.geometry = polygon;
query.spatialRelationship = rel
if(rel == "relation"){
query.relationParameter = "FF*FF****"
}
return featureLayer.queryFeatures(query).then((data) => {
0 Kudos
0 Replies