Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2k
fix: Fix USA subunits, clean up land, coastlines topojson layers#7555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
4018b7049bd7ae8c578e0bc373dede855453d935e78da774c453853cFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -9,6 +9,7 @@ | ||
| "**/test/**", | ||
| "**/tasks/**", | ||
| "**/devtools/**", | ||
| "**/topojson/**", | ||
| "!**/test/plot-schema.json", | ||
| "!**/dist", | ||
| "!**/stackgl_modules", | ||
| @@ -88,17 +89,7 @@ | ||
| "noVar":"off", | ||
| "noConsole": {"level":"off","options": {"allow": ["log"] } } | ||
| } | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. @camdecoster What is the effect of this config change? ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. You can override the global includes using this one. It included all the same stuff as the global one, so I removed it as redundant. | ||
| } | ||
| }, | ||
| "javascript": { | ||
| "globals": [ | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| - Fix cropping of subunits in USA topojson, clean up land and coastlines layers for all topojson [#7555](https://github.com/plotly/plotly.js/pull/7555) |
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -142,7 +142,7 @@ async function createLandLayer({ bounds, name, resolution, source }) { | ||
| const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/land.geojson`; | ||
| const commands = [ | ||
| inputFilePath, | ||
| '-dissolve2', | ||
| bounds.length ? `-clip bbox=${bounds.join(',')}` : '', | ||
| `-o ${outputFilePath}` | ||
| ].join(' '); | ||
| @@ -200,7 +200,10 @@ async function createLakesLayer({ name, resolution, source }) { | ||
| } | ||
| async function createSubunitsLayer({ name, resolution, source }) { | ||
| // Only include USA for 'usa' scope since the UN and NE borders don't match exactly and slivers of Canada creep in | ||
Contributor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more.
😄 | ||
| const filter = (name === 'usa' ? ['USA'] : ['AUS', 'BRA', 'CAN', 'USA']) | ||
| .map((id) => `adm0_a3 === "${id}"`) | ||
| .join(' || '); | ||
| const inputFilePath = `${outputDirGeojson}/${getNEFilename({ resolution, source })}.geojson`; | ||
| const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/subunits.geojson`; | ||
| const commands = [ | ||
| @@ -365,7 +368,8 @@ const commandsCountries50m = [ | ||
| `-each 'if (globalid === "{9FD54A50-0BFB-4385-B342-1C3BDEE5ED9B}") iso3cd = "XBT"'`, // Bir Tawil | ||
| `-each 'if (iso3cd) iso3cd = iso3cd.toUpperCase()'`, | ||
| `-filter '${filters.countries}'`, | ||
| // Snap polygons to clean up land, coastlines layers | ||
| '-clean snap-interval=0.000125', | ||
| `-o ${outputFilePathCountries50m}` | ||
| ].join(' '); | ||
| await mapshaper.runCommands(commandsCountries50m); | ||
| @@ -384,9 +388,8 @@ const inputFilePathCountries110m = outputFilePathCountries50m; | ||
| const outputFilePathCountries110m = `${outputDirGeojson}/${unFilename}_110m/countries.geojson`; | ||
| const commandsCountries110m = [ | ||
| inputFilePathCountries110m, | ||
| '-simplify 21%', | ||
| '-clean', | ||
| `-o ${outputFilePathCountries110m}` | ||
| ].join(' '); | ||
| await mapshaper.runCommands(commandsCountries110m); | ||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.
Large diffs are not rendered by default.
Uh oh!
There was an error while loading.Please reload this page.