AnsweredAssumed Answered

Not within, spatial Relationship

Question asked by matt.thery on Feb 11, 2019

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) => {

Outcomes