Fix incorrect applying command line parameters in case generating only world

This commit is contained in:
Sergey Yershov 2015-07-21 11:16:00 +03:00 committed by Alex Zolotarev
parent 9d8db80ecc
commit 3f2074401b
2 changed files with 5 additions and 3 deletions

View file

@ -31,7 +31,7 @@ protected:
/// @return feature offset in the file, which is used as an ID later
uint32_t WriteFeatureBase(vector<char> const & bytes, FeatureBuilder1 const & fb);
void WriteRawFeatureGeometry(FeatureBuilder1 const & fb);
void Flush();
public:

View file

@ -226,7 +226,8 @@ namespace
CHECK(!info.m_makeCoasts || !info.m_createWorld,
("We can't do make_coasts and generate_world at the same time"));
if (!info.m_makeCoasts)
// TODO: In this case we need more carefully check command line parameters for one country
if (!info.m_makeCoasts && info.m_splitByPolygons)
{
m_countries.reset(new CountriesGenerator(info));
@ -235,7 +236,8 @@ namespace
m_coastsHolder.reset(new feature::FeaturesCollector(info.GetTmpFileName(WORLD_COASTS_FILE_NAME)));
}
}
else
if (info.m_makeCoasts)
{
m_coasts.reset(new CoastlineFeaturesGenerator(Type(NATURAL_COASTLINE)));