cinohub / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

has_altitude returns false even if altitude is specified #66

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
const string kContent(
      "<Placemark id=\"123\">"
        "<Point><coordinates>1,2,3</coordinates></Point>"
      "</Placemark>");
string errors;
kmldom::PlacemarkPtr placemark =
    kmldom::AsPlacemark(kmldom::Parse(kContent.c_str(), &errors));
cout << "size: " << kmldom::AsPoint(placemark->get_geometry())->
    get_coordinates()->get_coordinates_array_size();
cout << "has altitude? " << kmldom::AsPoint(placemark->get_geometry())->
    get_coordinates()->get_coordinates_array_at(0).has_altitude();
cout << "altitude: " << kmldom::AsPoint(placemark->get_geometry())->
    get_coordinates()->get_coordinates_array_at(0).get_altitude();

> size: 1
> has altitude? 0
> altitude: 3

expected output:
> size: 1
> has altitude? 1
> altitude: 3

Original issue reported on code.google.com by stefan.b...@gmail.com on 22 Apr 2009 at 6:52

GoogleCodeExporter commented 8 years ago
Fixed in r548

Original comment by kml.b...@gmail.com on 20 May 2009 at 11:05