Skip to content

Commit a1e3d4e

Browse files
committed
calc ProjectAndUnProjectResults with updated wkt-parser (js)
1 parent 5c6cc26 commit a1e3d4e

File tree

3 files changed

+20
-33
lines changed

3 files changed

+20
-33
lines changed

test/proj4dart_test.dart

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -132,26 +132,13 @@ void main() {
132132
});
133133

134134
test('Project / unproject test for all OGC WKT projections', () {
135-
// TODO: These are removed because in laea.dart we got 'long0' as 0.0 but in proj4js it is undefined (we should get null - its coming from wkt parser)
136-
var testResults = all_proj4_ogc_results.testResults;
137-
testResults.remove('EPSG:3408');
138-
testResults.remove('EPSG:3409');
139-
testResults.remove('EPSG:3974');
140-
testResults.remove('EPSG:3973');
141-
testResults.remove('EPSG:6931');
142-
testResults.remove('EPSG:6932');
143-
144-
checkProjectAndUnProjectResults(proj4OGCWktTestDefs, testResults);
135+
checkProjectAndUnProjectResults(
136+
proj4OGCWktTestDefs, all_proj4_ogc_results.testResults);
145137
});
146138

147139
test('Project / unproject test for all ESRI WKT projections', () {
148-
// TODO: These are removed because in laea.dart we got 'long0' as 0.0 but in proj4js it is undefined (we should get null - its coming from wkt parser)
149-
var testResults = all_proj4_esri_results.testResults;
150-
testResults.remove('EPSG:3408');
151-
testResults.remove('ESRI:102017');
152-
testResults.remove('ESRI:102020');
153-
154-
checkProjectAndUnProjectResults(proj4ESRIWktTestDefs, testResults);
140+
checkProjectAndUnProjectResults(
141+
proj4ESRIWktTestDefs, all_proj4_esri_results.testResults);
155142
});
156143
});
157144

test/results/all_proj4_esri_wkt_results.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16789,17 +16789,17 @@ final Map<String, ProjectAndUnProjectResult> _testResults = {
1678916789
Point(x: double.nan, y: double.nan), null,
1679016790
inverseResultError: 'coordinates must be finite numbers'),
1679116791
'ESRI:102017': ProjectAndUnProjectResult(
16792-
Point(x: double.nan, y: double.nan), null,
16793-
inverseResultError: 'coordinates must be finite numbers'),
16792+
Point(x: 1441907.3090332332, y: -4467414.170635901),
16793+
Point(x: 17.888058560281515, y: 46.89226406911223)),
1679416794
'ESRI:102018': ProjectAndUnProjectResult(
1679516795
Point(x: 1550063.8492816938, y: -4802512.035474999),
1679616796
Point(x: 17.888058560281515, y: 46.89226406700877)),
1679716797
'ESRI:102019': ProjectAndUnProjectResult(
1679816798
Point(x: double.nan, y: double.nan), null,
1679916799
inverseResultError: 'coordinates must be finite numbers'),
1680016800
'ESRI:102020': ProjectAndUnProjectResult(
16801-
Point(x: double.nan, y: double.nan), null,
16802-
inverseResultError: 'coordinates must be finite numbers'),
16801+
Point(x: 3638523.4746012595, y: 11273118.062993607),
16802+
Point(x: 17.888058560281515, y: 46.89226406911217)),
1680316803
'ESRI:102021': ProjectAndUnProjectResult(
1680416804
Point(x: double.nan, y: double.nan), null,
1680516805
inverseResultError: 'coordinates must be finite numbers'),

test/results/all_proj4_ogc_wkt_results.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5492,11 +5492,11 @@ final Map<String, ProjectAndUnProjectResult> _testResults = {
54925492
Point(x: -20644820.551084325, y: 30074879.277563635),
54935493
Point(x: -78.49319663914245, y: -17.124395706761387)),
54945494
'EPSG:3408': ProjectAndUnProjectResult(
5495-
Point(x: double.nan, y: double.nan), null,
5496-
inverseResultError: 'coordinates must be finite numbers'),
5495+
Point(x: 1443989.670318814, y: -4473865.882377223),
5496+
Point(x: 17.888058560281515, y: 46.892130158581075)),
54975497
'EPSG:3409': ProjectAndUnProjectResult(
5498-
Point(x: double.nan, y: double.nan), null,
5499-
inverseResultError: 'coordinates must be finite numbers'),
5498+
Point(x: 3637843.5169242946, y: 11271011.372402279),
5499+
Point(x: 17.888058560281515, y: 46.89213015858108)),
55005500
'EPSG:3410': null /* blacklist */,
55015501
'EPSG:3411': ProjectAndUnProjectResult(
55025502
Point(x: 4335988.0113786, y: -302806.5645456136),
@@ -5597,8 +5597,8 @@ final Map<String, ProjectAndUnProjectResult> _testResults = {
55975597
'EPSG:3445': ProjectAndUnProjectResult(
55985598
Point(x: 17611813.210191824, y: 17528306.05463954), Point(x: 0, y: 90)),
55995599
'EPSG:3974': ProjectAndUnProjectResult(
5600-
Point(x: double.nan, y: double.nan), null,
5601-
inverseResultError: 'coordinates must be finite numbers'),
5600+
Point(x: 3638523.4746012595, y: 11273118.062993607),
5601+
Point(x: 17.888058560281515, y: 46.89226406911217)),
56025602
'EPSG:3446': ProjectAndUnProjectResult(
56035603
Point(x: 16971851.915299885, y: 17984948.307937823), Point(x: 0, y: 90)),
56045604
'EPSG:3447': ProjectAndUnProjectResult(
@@ -6746,8 +6746,8 @@ final Map<String, ProjectAndUnProjectResult> _testResults = {
67466746
Point(x: 6197425.928759272, y: 4812816.468950871),
67476747
Point(x: 17.88805856028151, y: 46.89226406700874)),
67486748
'EPSG:3973': ProjectAndUnProjectResult(
6749-
Point(x: double.nan, y: double.nan), null,
6750-
inverseResultError: 'coordinates must be finite numbers'),
6749+
Point(x: 1441907.3090332332, y: -4467414.170635901),
6750+
Point(x: 17.888058560281515, y: 46.89226406911223)),
67516751
'EPSG:4888': null /* blacklist */,
67526752
'EPSG:3976': ProjectAndUnProjectResult(
67536753
Point(x: 4982953.187166658, y: 20348945.033028428),
@@ -9598,11 +9598,11 @@ final Map<String, ProjectAndUnProjectResult> _testResults = {
95989598
Point(x: 23477569.54505528, y: 20173116.139789633),
95999599
Point(x: 17.888058560281525, y: 46.89226406700872)),
96009600
'EPSG:6931': ProjectAndUnProjectResult(
9601-
Point(x: double.nan, y: double.nan), null,
9602-
inverseResultError: 'coordinates must be finite numbers'),
9601+
Point(x: 1441907.3090332332, y: -4467414.170635901),
9602+
Point(x: 17.888058560281515, y: 46.89226406911223)),
96039603
'EPSG:6932': ProjectAndUnProjectResult(
9604-
Point(x: double.nan, y: double.nan), null,
9605-
inverseResultError: 'coordinates must be finite numbers'),
9604+
Point(x: 3638523.4746012595, y: 11273118.062993607),
9605+
Point(x: 17.888058560281515, y: 46.89226406911217)),
96069606
'EPSG:6933': null /* blacklist */,
96079607
'EPSG:7005': ProjectAndUnProjectResult(
96089608
Point(x: -1105167.6622423972, y: 5413518.053847402),

0 commit comments

Comments
 (0)