Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

Merged
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletionsbiome.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,6 +9,7 @@
"**/test/**",
"**/tasks/**",
"**/devtools/**",
"**/topojson/**",
"!**/test/plot-schema.json",
"!**/dist",
"!**/stackgl_modules",
Expand DownExpand Up@@ -88,17 +89,7 @@
"noVar":"off",
"noConsole": {"level":"off","options": {"allow": ["log"] } }
}
},
"includes": [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

@camdecoster What is the effect of this config change?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The 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.

"**",
"!**/stackgl_modules",
"!**/node_modules",
"!**/dist",
"!**/build",
"!**/tasks/test_amdefine.js",
"!**/tasks/test_requirejs.js",
"!**/test/jasmine/assets/jquery-1.8.3.min.js"
]
}
},
"javascript": {
"globals": [
Expand Down
1 change: 1 addition & 0 deletionsdraftlogs/7555_fix.md
View file
Open in desktop
Original file line numberDiff line numberDiff 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)
Binary file modifiedtest/image/baselines/canada_geo_projections.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/distance_satellite.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_across-antimeridian.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_africa-insets.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_aitoff-sinusoidal.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_bg-color.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_big-frame.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_bubbles-colorscales.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_bubbles-sizeref.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_canadian-cities.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_centering.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_choropleth-legend.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_choropleth-text.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_choropleth-usa.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_choropleth-usa_legend.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_conic-conformal.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_connectgaps.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_country-names-text-chart.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_country-names.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_custom-colorscale.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_custom-geojson.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_europe-bubbles.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_fill.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_first.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_fitbounds-geojson.png
View file
Open in desktop
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modifiedtest/image/baselines/geo_fitbounds-locations.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_fitbounds-scopes.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_kavrayskiy7.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_lakes-and-rivers.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_legendonly.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_miterlimit-base-layers.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_multi-geos.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_multiple-usa-choropleths.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_orthographic.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_point-selection.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_scattergeo-locations.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_scattergeo-out-of-usa.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_second.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_stereographic.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_text_chart_arrays.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_tick0.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_usa-states-on-world-scope.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_usa-states.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_visible_false_override_template.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/geo_winkel-tripel.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/grid_subplot_types.png
View file
Open in desktop
View file
Open in desktop
View file
Open in desktop
Binary file modifiedtest/image/baselines/marker-standoff.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/marker-standoff_auto-backoff.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/marker-standoff_auto-backoff2.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/plot_types.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/plot_types_grid_dash.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/texttemplate_scatter.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/various_geo_projections.png
View file
Open in desktop
Binary file modifiedtest/image/baselines/zz-geo_choropleth-egypt-sudan.png
View file
Open in desktop
15 changes: 9 additions & 6 deletionstopojson/bin/process_geodata.mjs
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -142,7 +142,7 @@ async function createLandLayer({ bounds, name, resolution, source }) {
const outputFilePath = `${outputDirGeojson}/${name}_${resolution}m/land.geojson`;
const commands = [
inputFilePath,
'-dissolve',
'-dissolve2',
bounds.length ? `-clip bbox=${bounds.join(',')}` : '',
`-o ${outputFilePath}`
].join(' ');
Expand DownExpand Up@@ -200,7 +200,10 @@ async function createLakesLayer({ name, resolution, source }) {
}

async function createSubunitsLayer({ name, resolution, source }) {
const filter = ['AUS', 'BRA', 'CAN', 'USA'].map((id) => `adm0_a3 === "${id}"`).join(' || ');
// Only include USA for 'usa' scope since the UN and NE borders don't match exactly and slivers of Canada creep in
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

slivers of Canada creep in

😄

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 = [
Expand DownExpand Up@@ -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}'`,
'-clean',
// Snap polygons to clean up land, coastlines layers
'-clean snap-interval=0.000125',
`-o ${outputFilePathCountries50m}`
].join(' ');
await mapshaper.runCommands(commandsCountries50m);
Expand All@@ -384,9 +388,8 @@ const inputFilePathCountries110m = outputFilePathCountries50m;
const outputFilePathCountries110m = `${outputDirGeojson}/${unFilename}_110m/countries.geojson`;
const commandsCountries110m = [
inputFilePathCountries110m,
'-simplify 20%',
// Use 'snap-interval' to fix alignment issues with continental USA, Alaska, and Mexico
'-clean snap-interval=0.015',
'-simplify 21%',
'-clean',
`-o ${outputFilePathCountries110m}`
].join(' ');
await mapshaper.runCommands(commandsCountries110m);
Expand Down
2 changes: 1 addition & 1 deletiontopojson/dist/africa_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/africa_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/antarctica_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/antarctica_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/asia_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/asia_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/europe_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/europe_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/north-america_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/north-america_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/oceania_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/oceania_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/south-america_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/south-america_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/usa_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/usa_50m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/world_110m.json
View file
Open in desktop

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletiontopojson/dist/world_50m.json
View file
Open in desktop

Large diffs are not rendered by default.


[8]ページ先頭

©2009-2025 Movatter.jp