36 #ifndef POLYGONFACTORY_H_
37 #define POLYGONFACTORY_H_
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;
90 vector<string> records;
97 line = CPPUtils::uppercase_string(CPPUtils::trim(line));
98 if (line.length() > 0 && line.find(
'#') != 0)
99 records.push_back(line);
103 if (records[0].find(
"POLYGON3D") == 0)
106 polygon->loadAscii(records);
111 polygon->loadAscii(records);
An exception class for all GeoTess objects.
Extends Polygon by including information and constraints about the radial dimension.
Factory method with a static method getPolygon() that returns a pointer to either a Polygon or Polygo...
static GeoTessPolygon * getPolygon(string inputFileName)
An ordered list of points on the surface of a unit sphere that define a closed polygon.
Opens ascii file for read and write access.
bool readLine(string &ln)
void openForRead(const string &fn)