Change the distance of an exist buffer polygon

297
2
Jump to solution
10-21-2022 12:21 AM
EricJing
New Contributor III

Hi guys,

I use GeometryEngine.Buffer to create a buffer polygon. I am wondering it is possble to change the distance at runtime....Does anyone know how to do it?

0 Kudos
2 Solutions

Accepted Solutions
MichaelDavis3
Occasional Contributor III

Just a guess - but based on how ESRI geometry works in the Runtime you will probably have to replace the existing buffer with a new feature.  You might be able to get away with just swapping out the geometry for new geometry if you want to keep other attributes in place.

View solution in original post

Nicholas-Furness
Esri Regular Contributor

Yep. You'll want to replace the geometry. Depending on the use case you might be able to hold on to the original geometry and generate new buffers, or you might be able to buffer out from the buffered one, but that could introduce cumulative errors. Probably OK for a simple circle buffer around a point, but may get tricky with an arbitrary polygon as the original source, especially if you'll want to "shrink" the buffer.

View solution in original post

2 Replies
MichaelDavis3
Occasional Contributor III

Just a guess - but based on how ESRI geometry works in the Runtime you will probably have to replace the existing buffer with a new feature.  You might be able to get away with just swapping out the geometry for new geometry if you want to keep other attributes in place.

Nicholas-Furness
Esri Regular Contributor

Yep. You'll want to replace the geometry. Depending on the use case you might be able to hold on to the original geometry and generate new buffers, or you might be able to buffer out from the buffered one, but that could introduce cumulative errors. Probably OK for a simple circle buffer around a point, but may get tricky with an arbitrary polygon as the original source, especially if you'll want to "shrink" the buffer.