Skip to content

CalculateBounds() returns null #50

Description

@timeichfeld-msa

Hello,

I have a geometry with many points, and need to get the boundingBox.
However, when I call Feature.CalculateBounds() it returns null.
Example: (1000 points in datapoints)

var track = new SharpKml.Dom.GX.Track();
foreach (var p in dataPoints)
{
    var vector = new SharpKml.Base.Vector(p.LatDeg, p.LonDeg, p.Z);
    track.AddCoordinate(vector);
    track.AddWhen(p.Timestamp);
    track.AddAngle(new SharpKml.Base.Angle(pitch, p.Heading, roll));
}

Placemark trackPm = new Placemark();
trackPm.Geometry = track;
var bb = trackPm.CalculateBounds();

BoundingBox bb is null;

Is there a step I am missing?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions