Select to view content in your preferred language

how to create a buffer around a feature polygon in a feature layer

1160
1
02-20-2011 02:41 AM
SolidSmoke
Emerging Contributor
I have created buffer for point geometry and when i try to create a buffer in the same way around a feature polygon in a Feature layer, it is showing an odd shape buffer around that. somebody please advise me to create a buffer around a feature polygon with the same shape of the feature.
0 Kudos
1 Reply
DanielWalton
Frequent Contributor
If by odd shape you mean the rounded corners, that is by definition what a buffer is (the buffer shape represents the set of all points a given distance out from the original shape, not the original shape scaled up). If you want the polygon to retain its shape, use a Mitred Offset instead:

_geometryService.OffsetAsync(
    new List<Graphic> { new Graphic { Geometry = geometry} }, 
    new OffsetParameters
    {
        OffsetDistance = 500,
        OffsetHow = GeometryOffset.Mitered,
        OffsetUnit =LinearUnit.Foot, 
        Simplify = true
    }
);
0 Kudos