Hi.
I would like to know how buffering is applied to the line shape.
The bounding box height of the buffer result is more (270 feet) than expected (200 feet)
'Create horizontal line 100 feet long
Dim p1 As New PointShape(-95.606609822483733, 41.805456965812482)
Dim p2 As New PointShape(-95.606609822483733, 41.805456965812482)
p2.TranslateByOffset(100, 0, GeographyUnit.DecimalDegree, DistanceUnit.Feet)
Dim ls As New LineShape
ls.Vertices.Add(New Vertex(p1))
ls.Vertices.Add(New Vertex(p2))
'Check the length of the line = 100.974975459508 - Approximately correct
Console.WriteLine("Length: " & ls.GetLength(GeographyUnit.DecimalDegree, DistanceUnit.Feet))
'Apply 100 feet buffer to the line
Dim mps As MultipolygonShape = ls.Buffer(100, GeographyUnit.DecimalDegree, DistanceUnit.Feet)
'Get bounding box from the buffer result
Dim ext As RectangleShape = mps.GetBoundingBox
'Check the width of the bounding box = 302.92317075103 - Approximately correct
ls = New LineShape
ls.Vertices.Add(New Vertex(ext.UpperLeftPoint))
ls.Vertices.Add(New Vertex(ext.UpperRightPoint))
Console.WriteLine("Width: " & ls.GetLength(GeographyUnit.DecimalDegree, DistanceUnit.Feet))
'Check the height of the bounding box = 270.923746270921 - Expected +- 200 feet
'Where extra 70.92 feet come from?
ls = New LineShape
ls.Vertices.Add(New Vertex(ext.UpperLeftPoint))
ls.Vertices.Add(New Vertex(ext.LowerLeftPoint))
Console.WriteLine("Height: " & ls.GetLength(GeographyUnit.DecimalDegree, DistanceUnit.Feet))