Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"**/test/**",
"**/tasks/**",
"**/devtools/**",
"**/topojson/**",
"!**/test/plot-schema.json",
"!**/dist",
"!**/stackgl_modules",
Expand Down Expand 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
Contributor Author

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 deletions draftlogs/7555_fix.md
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)
Binary file modified test/image/baselines/canada_geo_projections.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/distance_satellite.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_across-antimeridian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_africa-insets.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_aitoff-sinusoidal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bg-color.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_big-frame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bubbles-colorscales.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_bubbles-sizeref.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_canadian-cities.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_centering.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-text.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-usa.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_choropleth-usa_legend.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_conic-conformal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_connectgaps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_country-names-text-chart.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_country-names.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_custom-colorscale.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_custom-geojson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_europe-bubbles.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fill.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_first.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fitbounds-geojson.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/image/baselines/geo_fitbounds-locations.png
Binary file modified test/image/baselines/geo_fitbounds-scopes.png
Binary file modified test/image/baselines/geo_kavrayskiy7.png
Binary file modified test/image/baselines/geo_lakes-and-rivers.png
Binary file modified test/image/baselines/geo_legendonly.png
Binary file modified test/image/baselines/geo_miterlimit-base-layers.png
Binary file modified test/image/baselines/geo_multi-geos.png
Binary file modified test/image/baselines/geo_multiple-usa-choropleths.png
Binary file modified test/image/baselines/geo_orthographic.png
Binary file modified test/image/baselines/geo_point-selection.png
Binary file modified test/image/baselines/geo_scattergeo-locations.png
Binary file modified test/image/baselines/geo_scattergeo-out-of-usa.png
Binary file modified test/image/baselines/geo_second.png
Binary file modified test/image/baselines/geo_stereographic.png
Binary file modified test/image/baselines/geo_text_chart_arrays.png
Binary file modified test/image/baselines/geo_tick0.png
Binary file modified test/image/baselines/geo_usa-states-on-world-scope.png
Binary file modified test/image/baselines/geo_usa-states.png
Binary file modified test/image/baselines/geo_visible_false_override_template.png
Binary file modified test/image/baselines/geo_winkel-tripel.png
Binary file modified test/image/baselines/grid_subplot_types.png
Binary file modified test/image/baselines/h-colorbar_geo_multiple-usa-choropleths.png
Binary file modified test/image/baselines/marker-standoff.png
Binary file modified test/image/baselines/marker-standoff_auto-backoff.png
Binary file modified test/image/baselines/marker-standoff_auto-backoff2.png
Binary file modified test/image/baselines/plot_types.png
Binary file modified test/image/baselines/plot_types_grid_dash.png
Binary file modified test/image/baselines/texttemplate_scatter.png
Binary file modified test/image/baselines/various_geo_projections.png
Binary file modified test/image/baselines/zz-geo_choropleth-egypt-sudan.png
15 changes: 9 additions & 6 deletions topojson/bin/process_geodata.mjs
Original file line number Diff line number Diff 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 Down Expand 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 Down Expand 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 deletion topojson/dist/africa_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/africa_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/antarctica_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/antarctica_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/asia_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/asia_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/europe_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/europe_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/north-america_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/north-america_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/oceania_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/oceania_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/south-america_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/south-america_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/usa_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/usa_50m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/world_110m.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion topojson/dist/world_50m.json

Large diffs are not rendered by default.