36 #ifndef POLYGONFACTORY_H_
37 #define POLYGONFACTORY_H_
76 static Polygon* getPolygon(
string inputFileName)
78 if (inputFileName.find(
".kmz", inputFileName.length() - 4) != string::npos
79 || inputFileName.find(
".kml", inputFileName.length() - 4) != string::npos)
82 os << endl <<
"ERROR in Polygon::constructor" << endl
83 <<
"Cannot read files in kml or kmz format (Google Earth)." << endl
84 <<
"GeoTessExplorer has a utility to translate to ascii." << endl;
94 line = CPPUtils::uppercase_string(line);
95 if (line.find(
"POLYGON3D") == 0)
98 polygon->loadAscii(input);
100 else if (line.find(
"POLYGON") == 0)
103 polygon->loadAscii(input);
108 os << endl <<
"ERROR in PolygonFactory::getPolygon()" << endl
109 <<
"Expecting file to to start with string 'POLYGON3D' or 'POLYGON' but first line is" << endl