I am trying to create a negative Buffer in Arcade to query features inside, as it was possible in older versions (2022). When I execute it noch for example in the Arcade Playground "null" is returned instead of a shrink polygon.
To reproduce open the Arcade Playground https://developers.arcgis.com/arcade/playground/ and insert
var poly = Polygon(
{
rings: [
[
Point(
{
x: -97.06138,
y: 32.837,
z: 100,
hasZ: true,
spatialReference: { wkid: 3857 }
}
),
Point(
{
x: -97.06133,
y: 32.836,
z: 50,
hasZ: true,
spatialReference: { wkid: 3857 }
}
),
Point(
{
x: -97.06124,
y: 32.834,
z: 20,
hasZ: true,
spatialReference: { wkid: 3857 }
}
),
Point(
{
x: -97.06127,
y: 32.832,
z: 0,
hasZ: true,
spatialReference: { wkid: 3857 }
}
)
]
],
hasZ: true,
spatialReference: { wkid: 3857 }
}
);
Buffer(poly, -10) //return null
//BufferGeodetic(poly, -10) //return null
Is this a bug or intention?
Solved! Go to Solution.
then the buffer size is too large relative to the size of the polygon (eg. bigger than its extent)
not sure about arcade but most polygon geometry usually has a duplicate first and last point, what you have given could be interpreted as a polyline
Yes but it's the example polygon of the Arcade Playground. The result is also null if i add the first point at the end.
then the buffer size is too large relative to the size of the polygon (eg. bigger than its extent)
Yeah you are right the polygon was to small. (why is the default playground polygon so small?). This was also the error for the "Attribute Rule" I wanted to save. If the buffer is -1 (meters), the verification of the arcade statement fails. Under -0.3 the expression is valid.
Wich polygon is used for the statement verification in attribute rules in Pro 3.3?
It would be prudent to calculate the poly extent in planar coordinates prior to trying a negative buffer. At least the extent would give you the ability to assess other values like perimeter, area and other possible measures.