Hi Community Members,
I'm trying to create a FeatureSet by intersecting it with another FeatureClass, but having problems. BTW the Portal Version is 11.3. The Scenario is fairly simple and I've read the documentation for intersects / Contains / WithIn.
- for Intersects it is :
- Intersects(features, inputGeometry) -> FeatureSet
- For Contains it is:
- Contains(containerGeometry, insideFeatures) -> FeatureSet
- and for Within it is:
- Within(innerGeometry, outerFeatures) -> FeatureSet
Now as per my understanding, all these functions work with Features i.e FeatureSets against a Geometry, which could be a feature.
Here is what I've done so far:
var MyPortal = Portal("https://xyz.com/portal/");
var tempfs = FeatureSetByPortalItem(
MyPortal,
"5cab64be2ea5448aa5b5e220adf7bf05",
0,
["*"],
true
);
var fsRoads =
FeatureSetByPortalItem(
MyPortal,
"f4dfa29e2c0947cda6c7b9f2378253fd",
0,
["*"],
true
)
Two featureSets, One Contains dissolved buffered Roads i.e. a single Feature and the other FeatureSet contains point Features. I'm trying to get a featureSet by:
var myfs = Intersects(tempfs, First(fsRoads))
return (myfs)
or
var myfs = Within(first(fsRoads), tempfs)
return (myfs)
or
var myfs = Contains(first(fsRoads), tempfs)
returns (myfs)
but all these do not seem to work, no matter what I do. I've checked the SRIDs of both FEatureSets, they are the same. Counted individual FeatureSets, Counts are Ok. but there is no result. Trying to generate a FeatureSet that could be used for other Items in a Dashboard.
This is the Error I get whenever I test it
Test execution error: Unknown Error. Verify test data.
Could anyone point me to the correct solution as I don't want to do it using a for loop, which BTW takes forever to work.
Thanks in advance for all the help.