mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-30 22:51:16 +01:00
Compare commits
3 Commits
2eeeb965dc
...
0c7296e006
Author | SHA1 | Date | |
---|---|---|---|
0c7296e006 | |||
01dfbb3706 | |||
e8b4105365 |
@ -3143,6 +3143,39 @@ ED50 / TM 0 N,23090,4230,16400
|
|||||||
ED50 / TM 5 NE,23095,4230,16405
|
ED50 / TM 5 NE,23095,4230,16405
|
||||||
Fahud / UTM zone 39N,23239,4232,16039
|
Fahud / UTM zone 39N,23239,4232,16039
|
||||||
Fahud / UTM zone 40N,23240,4232,16040
|
Fahud / UTM zone 40N,23240,4232,16040
|
||||||
|
NAD83(2011) / ICS83-Freeport (ftUS),23301,6318,11264
|
||||||
|
NAD83(2011) / ICS83-Rockford (ftUS),23302,6318,11265
|
||||||
|
NAD83(2011) / ICS83-Aurora (ftUS),23303,6318,11233
|
||||||
|
NAD83(2011) / ICS83-Chicago (ftUS),23304,6318,11234
|
||||||
|
NAD83(2011) / ICS83-Moline (ftUS),23305,6318,11235
|
||||||
|
NAD83(2011) / ICS83-Sterling (ftUS),23306,6318,11236
|
||||||
|
NAD83(2011) / ICS83-Ottawa (ftUS),23307,6318,11237
|
||||||
|
NAD83(2011) / ICS83-Joliet (ftUS),23308,6318,11238
|
||||||
|
NAD83(2011) / ICS83-Monmouth (ftUS),23309,6318,11239
|
||||||
|
NAD83(2011) / ICS83-Galesburg (ftUS),23310,6318,11240
|
||||||
|
NAD83(2011) / ICS83-Peoria (ftUS),23311,6318,11241
|
||||||
|
NAD83(2011) / ICS83-Eureka (ftUS),23312,6318,11242
|
||||||
|
NAD83(2011) / ICS83-Bloomington (ftUS),23313,6318,11243
|
||||||
|
NAD83(2011) / ICS83-Pontiac (ftUS),23314,6318,11244
|
||||||
|
NAD83(2011) / ICS83-Watseka (ftUS),23315,6318,11245
|
||||||
|
NAD83(2011) / ICS83-Quincy (ftUS),23316,6318,11246
|
||||||
|
NAD83(2011) / ICS83-Macomb (ftUS),23317,6318,11247
|
||||||
|
NAD83(2011) / ICS83-Lincoln (ftUS),23318,6318,11248
|
||||||
|
NAD83(2011) / ICS83-Decatur (ftUS),23319,6318,11249
|
||||||
|
NAD83(2011) / ICS83-Champaign (ftUS),23320,6318,11250
|
||||||
|
NAD83(2011) / ICS83-Jacksonville (ftUS),23321,6318,11251
|
||||||
|
NAD83(2011) / ICS83-Springfield (ftUS),23322,6318,11252
|
||||||
|
NAD83(2011) / ICS83-Charleston (ftUS),23323,6318,11253
|
||||||
|
NAD83(2011) / ICS83-Jerseyville (ftUS),23324,6318,11254
|
||||||
|
NAD83(2011) / ICS83-Carlinville (ftUS),23325,6318,11255
|
||||||
|
NAD83(2011) / ICS83-Taylorville (ftUS),23326,6318,11256
|
||||||
|
NAD83(2011) / ICS83-Effingham (ftUS),23327,6318,11257
|
||||||
|
NAD83(2011) / ICS83-Robinson (ftUS),23328,6318,11258
|
||||||
|
NAD83(2011) / ICS83-Belleville (ftUS),23329,6318,11259
|
||||||
|
NAD83(2011) / ICS83-Mount Vernon (ftUS),23330,6318,11260
|
||||||
|
NAD83(2011) / ICS83-Olney (ftUS),23331,6318,11261
|
||||||
|
NAD83(2011) / ICS83-Carbondale (ftUS),23332,6318,11262
|
||||||
|
NAD83(2011) / ICS83-Metropolis (ftUS),23333,6318,11263
|
||||||
HD72 / EOV,23700,4237,19931
|
HD72 / EOV,23700,4237,19931
|
||||||
DGN95 / Indonesia TM-3 zone 46.2,23830,4755,17432
|
DGN95 / Indonesia TM-3 zone 46.2,23830,4755,17432
|
||||||
DGN95 / Indonesia TM-3 zone 47.1,23831,4755,17433
|
DGN95 / Indonesia TM-3 zone 47.1,23831,4755,17433
|
||||||
|
|
@ -774,6 +774,39 @@ Illinois CS27 East zone,11201,9003,9807,4497,8801,36.4,9110,8802,-88.2,9110,8805
|
|||||||
Illinois CS27 West zone,11202,9003,9807,4497,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,500000,9003,8807,0,9003,,,,,,
|
Illinois CS27 West zone,11202,9003,9807,4497,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,500000,9003,8807,0,9003,,,,,,
|
||||||
SPCS83 Illinois East zone (meters),11231,9001,9807,4499,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,300000,9001,8807,0,9001,,,,,,
|
SPCS83 Illinois East zone (meters),11231,9001,9807,4499,8801,36.4,9110,8802,-88.2,9110,8805,0.999975,9201,8806,300000,9001,8807,0,9001,,,,,,
|
||||||
SPCS83 Illinois West zone (meters),11232,9001,9807,4499,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,700000,9001,8807,0,9001,,,,,,
|
SPCS83 Illinois West zone (meters),11232,9001,9807,4499,8801,36.4,9110,8802,-90.1,9110,8805,0.999941177,9201,8806,700000,9001,8807,0,9001,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Aurora zone (US survey foot),11233,9003,9807,1053,8801,41.15,9110,8802,-88.3,9110,8805,1.00003,9201,8806,3773000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Chicago zone (US survey foot),11234,9003,9807,1053,8801,41.15,9110,8802,-87.48,9110,8805,1.000023,9201,8806,4757000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Moline zone (US survey foot),11235,9003,9801,1053,8801,41.33,9110,8802,-90.36,9110,8805,1.000024,9201,8806,5741000.0,9003,8807,755000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Sterling zone (US survey foot),11236,9003,9801,1053,8801,41.33,9110,8802,-90.03,9110,8805,1.00002,9201,8806,6726000.0,9003,8807,755000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Ottawa zone (US survey foot),11237,9003,9801,1053,8801,41.18,9110,8802,-89.03,9110,8805,1.000023,9201,8806,7743000.0,9003,8807,755000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Joliet zone (US survey foot),11238,9003,9807,1053,8801,40.33,9110,8802,-88.0,9110,8805,1.000022,9201,8806,8694000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Monmouth zone (US survey foot),11239,9003,9807,1053,8801,40.12,9110,8802,-90.51,9110,8805,1.000024,9201,8806,9678000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Galesburg zone (US survey foot),11240,9003,9807,1053,8801,37.15,9110,8802,-90.06,9110,8805,1.000023,9201,8806,230000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Peoria zone (US survey foot),11241,9003,9807,1053,8801,37.24,9110,8802,-89.39,9110,8805,1.000023,9201,8806,1378000.0,9003,8807,622000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Eureka zone (US survey foot),11242,9003,9807,1053,8801,37.27,9110,8802,-89.18,9110,8805,1.000025,9201,8806,2756000.0,9003,8807,427000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Bloomington zone (US survey foot),11243,9003,9801,1053,8801,40.3,9110,8802,-88.51,9110,8805,1.000031,9201,8806,3773000.0,9003,8807,1739000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Pontiac zone (US survey foot),11244,9003,9801,1053,8801,40.54,9110,8802,-88.33,9110,8805,1.000025,9201,8806,4757000.0,9003,8807,1739000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Watseka zone (US survey foot),11245,9003,9801,1053,8801,40.45,9110,8802,-87.57,9110,8805,1.000024,9201,8806,5741000.0,9003,8807,1739000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Quincy zone (US survey foot),11246,9003,9807,1053,8801,36.45,9110,8802,-91.15,9110,8805,1.000023,9201,8806,6726000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Macomb zone (US survey foot),11247,9003,9807,1053,8801,36.48,9110,8802,-90.36,9110,8805,1.000024,9201,8806,7710000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Lincoln zone (US survey foot),11248,9003,9801,1053,8801,40.09,9110,8802,-89.48,9110,8805,1.000018,9201,8806,8760000.0,9003,8807,1739000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Decatur zone (US survey foot),11249,9003,9807,1053,8801,36.18,9110,8802,-88.48,9110,8805,1.000024,9201,8806,9678000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Champaign zone (US survey foot),11250,9003,9801,1053,8801,40.09,9110,8802,-88.0,9110,8805,1.000026,9201,8806,328000.0,9003,8807,2822000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Jacksonville zone (US survey foot),11251,9003,9801,1053,8801,39.39,9110,8802,-90.36,9110,8805,1.000023,9201,8806,1247000.0,9003,8807,2822000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Springfield zone (US survey foot),11252,9003,9801,1053,8801,39.45,9110,8802,-89.39,9110,8805,1.000022,9201,8806,2329000.0,9003,8807,2887000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Charleston zone (US survey foot),11253,9003,9801,1053,8801,39.39,9110,8802,-88.0,9110,8805,1.000024,9201,8806,3773000.0,9003,8807,2756000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Jerseyville zone (US survey foot),11254,9003,9807,1053,8801,32.51,9110,8802,-90.3,9110,8805,1.000019,9201,8806,4757000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Carlinville zone (US survey foot),11255,9003,9801,1053,8801,39.18,9110,8802,-90.09,9110,8805,1.00002,9201,8806,5741000.0,9003,8807,2756000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Taylorville zone (US survey foot),11256,9003,9807,1053,8801,33.09,9110,8802,-89.24,9110,8805,1.000023,9201,8806,6726000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Effingham zone (US survey foot),11257,9003,9801,1053,8801,38.57,9110,8802,-89.0,9110,8805,1.000019,9201,8806,7710000.0,9003,8807,2756000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Robinson zone (US survey foot),11258,9003,9801,1053,8801,39.06,9110,8802,-88.0,9110,8805,1.000017,9201,8806,8694000.0,9003,8807,2756000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Belleville zone (US survey foot),11259,9003,9807,1053,8801,32.21,9110,8802,-90.0,9110,8805,1.000016,9201,8806,9678000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Mount Vernon zone (US survey foot),11260,9003,9801,1053,8801,38.27,9110,8802,-89.09,9110,8805,1.000015,9201,8806,328000.0,9003,8807,3773000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Olney zone (US survey foot),11261,9003,9801,1053,8801,38.33,9110,8802,-88.09,9110,8805,1.000013,9201,8806,1247000.0,9003,8807,3773000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Carbondale zone (US survey foot),11262,9003,9801,1053,8801,37.54,9110,8802,-88.57,9110,8805,1.000012,9201,8806,2395000.0,9003,8807,3773000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Metropolis zone (US survey foot),11263,9003,9801,1053,8801,37.12,9110,8802,-88.54,9110,8805,1.00001,9201,8806,3642000.0,9003,8807,3839000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Freeport zone (US survey foot),11264,9003,9801,1053,8801,42.12,9110,8802,-89.57,9110,8805,1.000029,9201,8806,1804000.0,9003,8807,755000.0,9003,,,,,,
|
||||||
|
Illinois Coordinate System of 1983 Rockford zone (US survey foot),11265,9003,9807,1053,8801,41.15,9110,8802,-89.15,9110,8805,1.000029,9201,8806,2822000.0,9003,8807,492000.0,9003,,,,,,
|
||||||
Indiana CS27 East zone,11301,9003,9807,4497,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,500000,9003,8807,0,9003,,,,,,
|
Indiana CS27 East zone,11301,9003,9807,4497,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,500000,9003,8807,0,9003,,,,,,
|
||||||
Indiana CS27 West zone,11302,9003,9807,4497,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,500000,9003,8807,0,9003,,,,,,
|
Indiana CS27 West zone,11302,9003,9807,4497,8801,37.3,9110,8802,-87.05,9110,8805,0.999966667,9201,8806,500000,9003,8807,0,9003,,,,,,
|
||||||
SPCS83 Indiana East zone (meters),11331,9001,9807,4499,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,100000,9001,8807,250000,9001,,,,,,
|
SPCS83 Indiana East zone (meters),11331,9001,9807,4499,8801,37.3,9110,8802,-85.4,9110,8805,0.999966667,9201,8806,100000,9001,8807,250000,9001,,,,,,
|
||||||
|
|
@ -14,22 +14,27 @@ bool CSVParser::parse(QFile *file, QList<TrackData> &tracks,
|
|||||||
bool ok;
|
bool ok;
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
while (!csv.atEnd()) {
|
||||||
if (!csv.readEntry(entry) || entry.size() < 3) {
|
if (!csv.readEntry(entry)) {
|
||||||
_errorString = "Parse error";
|
_errorString = "Parse error";
|
||||||
_errorLine = csv.line();
|
_errorLine = csv.line();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.size() < 3) {
|
||||||
|
_errorString = "Invalid column count";
|
||||||
|
_errorLine = csv.line() - 1;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
double lon = entry.at(0).toDouble(&ok);
|
double lon = entry.at(0).toDouble(&ok);
|
||||||
if (!ok || (lon < -180.0 || lon > 180.0)) {
|
if (!ok || (lon < -180.0 || lon > 180.0)) {
|
||||||
_errorString = "Invalid longitude";
|
_errorString = "Invalid longitude";
|
||||||
_errorLine = csv.line();
|
_errorLine = csv.line() - 1;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
double lat = entry.at(1).toDouble(&ok);
|
double lat = entry.at(1).toDouble(&ok);
|
||||||
if (!ok || (lat < -90.0 || lat > 90.0)) {
|
if (!ok || (lat < -90.0 || lat > 90.0)) {
|
||||||
_errorString = "Invalid latitude";
|
_errorString = "Invalid latitude";
|
||||||
_errorLine = csv.line();
|
_errorLine = csv.line() - 1;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Waypoint wp(Coordinates(lon, lat));
|
Waypoint wp(Coordinates(lon, lat));
|
||||||
|
@ -159,7 +159,7 @@ bool CUPParser::parse(QFile *file, QList<TrackData> &tracks,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
_errorLine = csv.line();
|
_errorLine = csv.line() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -147,50 +147,55 @@ bool Conversion::loadList(const QString &path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
while (!csv.atEnd()) {
|
||||||
if (!csv.readEntry(entry) || entry.size() < 26) {
|
if (!csv.readEntry(entry)) {
|
||||||
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.size() < 26) {
|
||||||
|
qWarning("%s:%d: Invalid column count", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QString name(entry.at(0));
|
QString name(entry.at(0));
|
||||||
int proj = entry.at(1).toInt(&res);
|
int proj = entry.at(1).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid projection code", qPrintable(path),
|
qWarning("%s:%d: Invalid projection code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int units = entry.at(2).toInt(&res);
|
int units = entry.at(2).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid linear units code", qPrintable(path),
|
qWarning("%s:%d: Invalid linear units code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int transform = entry.at(3).toInt(&res);
|
int transform = entry.at(3).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid coordinate transformation code",
|
qWarning("%s:%d: Invalid coordinate transformation code",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int cs = entry.at(4).toInt(&res);
|
int cs = entry.at(4).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid coordinate system code",
|
qWarning("%s:%d: Invalid coordinate system code",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!LinearUnits(units).isValid()) {
|
if (!LinearUnits(units).isValid()) {
|
||||||
qWarning("%s:%d: Unknown linear units code", qPrintable(path),
|
qWarning("%s:%d: Unknown linear units code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!Method(transform).isValid()) {
|
if (!Method(transform).isValid()) {
|
||||||
qWarning("%s:%d: Unknown coordinate transformation code",
|
qWarning("%s:%d: Unknown coordinate transformation code",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!CoordinateSystem(cs).isValid()) {
|
if (!CoordinateSystem(cs).isValid()) {
|
||||||
qWarning("%s:%d: Unknown coordinate system code", qPrintable(path),
|
qWarning("%s:%d: Unknown coordinate system code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -46,6 +46,7 @@ CoordinateSystem::CoordinateSystem(int code)
|
|||||||
case 4499:
|
case 4499:
|
||||||
_axisOrder = XY;
|
_axisOrder = XY;
|
||||||
break;
|
break;
|
||||||
|
case 1053:
|
||||||
case 4500:
|
case 4500:
|
||||||
case 4530:
|
case 4530:
|
||||||
case 4531:
|
case 4531:
|
||||||
|
@ -44,25 +44,32 @@ bool Ellipsoid::loadList(const QString &path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
while (!csv.atEnd()) {
|
||||||
if (!csv.readEntry(entry) || entry.size() < 4) {
|
if (!csv.readEntry(entry)) {
|
||||||
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.size() < 4) {
|
||||||
|
qWarning("%s:%d: Invalid column count", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int id = entry.at(1).toInt(&res);
|
int id = entry.at(1).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s: %d: Invalid ellipsoid code", qPrintable(path),
|
qWarning("%s:%d: Invalid ellipsoid code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double radius = entry.at(2).toDouble(&res);
|
double radius = entry.at(2).toDouble(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s: %d: Invalid radius", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid radius", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double flattening = entry.at(3).toDouble(&res);
|
double flattening = entry.at(3).toDouble(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s: %d: Invalid flattening", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid flattening", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,86 +101,92 @@ bool GCS::loadList(const QString &path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
while (!csv.atEnd()) {
|
||||||
if (!csv.readEntry(entry) || entry.size() < 14) {
|
if (!csv.readEntry(entry)) {
|
||||||
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.size() < 14) {
|
||||||
|
qWarning("%s:%d: Invalid column count", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
int id = parameter(entry.at(1), &res);
|
int id = parameter(entry.at(1), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid GCS code", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid GCS code", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int gd = parameter(entry.at(2), &res);
|
int gd = parameter(entry.at(2), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid geodetic datum code", qPrintable(path),
|
qWarning("%s:%d: Invalid geodetic datum code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int au = entry.at(3).toInt(&res);
|
int au = entry.at(3).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid angular units code", qPrintable(path),
|
qWarning("%s:%d: Invalid angular units code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int el = entry.at(4).toInt(&res);
|
int el = entry.at(4).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid ellipsoid code", qPrintable(path),
|
qWarning("%s:%d: Invalid ellipsoid code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int pm = entry.at(5).toInt(&res);
|
int pm = entry.at(5).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid prime meridian code", qPrintable(path),
|
qWarning("%s:%d: Invalid prime meridian code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int ct = entry.at(6).toInt(&res);
|
int ct = entry.at(6).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid coordinates transformation code",
|
qWarning("%s:%d: Invalid coordinates transformation code",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double dx = entry.at(7).toDouble(&res);
|
double dx = entry.at(7).toDouble(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid dx", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid dx", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double dy = entry.at(8).toDouble(&res);
|
double dy = entry.at(8).toDouble(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid dy", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid dy", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double dz = entry.at(9).toDouble(&res);
|
double dz = entry.at(9).toDouble(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid dz", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid dz", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double rx = parameterd(entry.at(10), &res);
|
double rx = parameterd(entry.at(10), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid rx", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid rx", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double ry = parameterd(entry.at(11), &res);
|
double ry = parameterd(entry.at(11), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid ry", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid ry", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double rz = parameterd(entry.at(12), &res);
|
double rz = parameterd(entry.at(12), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid rz", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid rz", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
double ds = parameterd(entry.at(13), &res);
|
double ds = parameterd(entry.at(13), &res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid ds", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid ds", qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Ellipsoid &e = Ellipsoid::ellipsoid(el);
|
const Ellipsoid &e = Ellipsoid::ellipsoid(el);
|
||||||
if (e.isNull()) {
|
if (e.isNull()) {
|
||||||
qWarning("%s:%d: Unknown ellipsoid code", qPrintable(path),
|
qWarning("%s:%d: Unknown ellipsoid code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -197,12 +203,12 @@ bool GCS::loadList(const QString &path)
|
|||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
qWarning("%s:%d: Unknown coordinates transformation method",
|
qWarning("%s:%d: Unknown coordinates transformation method",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (!datum.isValid()) {
|
if (!datum.isValid()) {
|
||||||
qWarning("%s:%d: Invalid coordinates transformation parameters",
|
qWarning("%s:%d: Invalid coordinates transformation parameters",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,7 +217,7 @@ bool GCS::loadList(const QString &path)
|
|||||||
_gcss.append(Entry(id, gd, entry.at(0), gcs));
|
_gcss.append(Entry(id, gd, entry.at(0), gcs));
|
||||||
else
|
else
|
||||||
qWarning("%s:%d: Unknown prime meridian/angular units code",
|
qWarning("%s:%d: Unknown prime meridian/angular units code",
|
||||||
qPrintable(path), csv.line());
|
qPrintable(path), csv.line() - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -37,35 +37,44 @@ bool PCS::loadList(const QString &path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while (!csv.atEnd()) {
|
while (!csv.atEnd()) {
|
||||||
if (!csv.readEntry(entry) || entry.size() < 4) {
|
if (!csv.readEntry(entry)) {
|
||||||
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
qWarning("%s:%d: Parse error", qPrintable(path), csv.line());
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (entry.size() < 4) {
|
||||||
|
qWarning("%s:%d: Invalid column count", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
QString name(entry.at(0));
|
QString name(entry.at(0));
|
||||||
int id = entry.at(1).toInt(&res);
|
int id = entry.at(1).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid PCS code", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid PCS code", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int gcs = entry.at(2).toInt(&res);
|
int gcs = entry.at(2).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid GCS code", qPrintable(path), csv.line());
|
qWarning("%s:%d: Invalid GCS code", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int proj = entry.at(3).toInt(&res);
|
int proj = entry.at(3).toInt(&res);
|
||||||
if (!res) {
|
if (!res) {
|
||||||
qWarning("%s:%d: Invalid projection code", qPrintable(path),
|
qWarning("%s:%d: Invalid projection code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (GCS::gcs(gcs).isNull()) {
|
if (GCS::gcs(gcs).isNull()) {
|
||||||
qWarning("%s:%d: Unknown GCS code", qPrintable(path), csv.line());
|
qWarning("%s:%d: Unknown GCS code", qPrintable(path),
|
||||||
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (Conversion::conversion(proj).isNull()) {
|
if (Conversion::conversion(proj).isNull()) {
|
||||||
qWarning("%s:%d: Unknown projection code", qPrintable(path),
|
qWarning("%s:%d: Unknown projection code", qPrintable(path),
|
||||||
csv.line());
|
csv.line() - 1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user