Skip to content

Commit

Permalink
Merge pull request #10832 from rouault/fix_10829
Browse files Browse the repository at this point in the history
LIBKML: dump feature when its geometry cannot be written
  • Loading branch information
rouault authored Sep 27, 2024
2 parents 82c04de + ce8b294 commit caf4b54
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ogr/ogrsf_frmts/libkml/ogrlibkmlfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,12 @@ FeaturePtr feat2kml(OGRLIBKMLDataSource *poOgrDS, OGRLIBKMLLayer *poOgrLayer,
{
ElementPtr poKmlElement = geom2kml(poOgrGeom, -1, poKmlFactory);
if (!poKmlElement)
{
CPLError(CE_Failure, CPLE_AppDefined,
"Cannot translate feature: %s",
poOgrFeat->DumpReadableAsString().c_str());
return nullptr;
}

poKmlPlacemark->set_geometry(AsGeometry(std::move(poKmlElement)));
}
Expand Down

0 comments on commit caf4b54

Please sign in to comment.