Extend FeatureBuilder1 access to feature types

Add some debug info
This commit is contained in:
Sergey Yershov 2015-07-14 12:35:30 +03:00 committed by Alex Zolotarev
parent 33364f793e
commit 45d7c4a28d
3 changed files with 11 additions and 0 deletions

View file

@ -50,6 +50,7 @@ public:
inline bool HasType(uint32_t t) const { return m_params.IsTypeExist(t); }
inline bool PopExactType(uint32_t type) { return m_params.PopExactType(type); }
inline void SetType(uint32_t type) { m_params.SetType(type); }
inline uint32_t FindType(uint32_t comp, uint8_t level) const { return m_params.FindType(comp, level); }
/// Check classificator types for their compatibility with feature geometry type.
/// Need to call when using any classificator types manipulating.

View file

@ -309,14 +309,23 @@ namespace
size_t const count = m_coasts->GetCellsCount();
LOG(LINFO, ("Generating coastline polygons", count));
size_t totalRegions = 0;
size_t totalPoints = 0;
size_t totalPolygons = 0;
for (size_t i = 0; i < count; ++i)
{
vector<FeatureBuilder1> vecFb;
m_coasts->GetFeatures(i, vecFb);
for (size_t j = 0; j < vecFb.size(); ++j)
{
(*m_coastsHolder)(vecFb[j]);
++totalRegions;
totalPoints += vecFb[j].GetPointsCount();
totalPolygons += vecFb[j].GetPolygonsCount();
}
}
LOG(LINFO, ("Total regions:", totalRegions, "total points:", totalPoints, "totalPolygons:", totalPolygons));
}
else if (m_coastsHolder)
{

View file

@ -260,6 +260,7 @@ if [ "$MODE" == "coast" ]; then
fi
done
# make a working copy of generated coastlines file
[ -n "$OPT_WORLD" ] && cp "$INTCOASTSDIR/WorldCoasts.rawdump" "$INTDIR"
[ -n "$OPT_WORLD" ] && cp "$INTCOASTSDIR/WorldCoasts.geom" "$INTDIR"
[ -z "$KEEP_INTDIR" ] && rm -r "$INTCOASTSDIR"
MODE=inter