MCPcopy Create free account
hub / github.com/comaps/comaps / Process

Method Process

generator/final_processor_coastline.cpp:23–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23void CoastlineFinalProcessor::Process()
24{
25 LOG(LINFO, ("Processing coastline..."));
26 ForEachFeatureRawFormat<serialization_policy::MaxAccuracy>(
27 m_filename, [this](FeatureBuilder const & fb, uint64_t) { m_generator.Process(fb); });
28
29 FeaturesAndRawGeometryCollector collector(m_coastlineGeomFilename, m_coastlineRawGeomFilename);
30 // Check and stop if some coasts were not merged.
31 CHECK(m_generator.Finish(), ());
32
33 LOG(LINFO, ("Generating coastline polygons..."));
34 size_t totalFeatures = 0;
35 size_t totalPoints = 0;
36 size_t totalPolygons = 0;
37 for (auto const & fb : m_generator.GetFeatures(m_threadsCount))
38 {
39 collector.Collect(fb);
40 ++totalFeatures;
41 totalPoints += fb.GetPointsCount();
42 totalPolygons += fb.GetPolygonsCount();
43 }
44
45 LOG(LINFO,
46 ("Total coastline features:", totalFeatures, "total polygons:", totalPolygons, "total points:", totalPoints));
47}
48} // namespace generator

Callers

nothing calls this directly

Calls 5

GetFeaturesMethod · 0.80
GetPolygonsCountMethod · 0.80
FinishMethod · 0.45
CollectMethod · 0.45
GetPointsCountMethod · 0.45

Tested by

no test coverage detected