Boundary overlap validation improvements:
- Improve overlap validation script to be less buggy
- Account for all acceptable boundary overlaps.
- Add linting rule to require a description for each expected overlap.
- Remove diffs from building script that avoided overlaps
- Fix Broken_Hill timezone boundary source
- Fix ogr2ogr output command
Fixes #41
diff --git a/lint-json.js b/lint-json.js
index 9884ccf..95f2f55 100644
--- a/lint-json.js
+++ b/lint-json.js
@@ -1,5 +1,6 @@
const osmBoundarySources = require('./osmBoundarySources.json')
const zoneCfg = require('./timezones.json')
+const expectedZoneOverlaps = require('./expectedZoneOverlaps.json')
let numErrors = 0
@@ -37,6 +38,16 @@
}
})
+// Make sure all expected zone overlaps have a description
+Object.keys(expectedZoneOverlaps).forEach(zoneOverlap => {
+ expectedZoneOverlaps[zoneOverlap].forEach((overlapBounds, idx) => {
+ if (!overlapBounds.description || overlapBounds.description.length < 3) {
+ numErrors++
+ console.error(`Expected overlap #${idx} of zones ${zoneOverlap} missing description`)
+ }
+ })
+})
+
if (numErrors > 0) {
console.error(`${numErrors} errors found`)
process.exit(1)