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

Commit 7a0fa22

Browse files
Merge pull request #7481 from plotly/cam/un-geodata-cleanup
refactor: Clean up files related to UN topojson
2 parents c1bd679 + 86e72f8 commit 7a0fa22

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

‎CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ where X.Y.Z is the semver of most recent plotly.js release.
1919
with thanks to @my-tien for the contribution!
2020

2121
### Changed
22-
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot
22+
- Switch to United Nations (coastlines, countries, land, ocean) + Natural Earth (lakes, rivers, subunits) geodata for building topojson used in geo plot[[#7393](https://github.com/plotly/plotly.js/pull/7393)]
2323
- Make 'png' all caps [[#7400](https://github.com/plotly/plotly.js/pull/7400)]
2424

2525
### Fixed

‎draftlogs/7481_change.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Refactor files related to UN topojson [[#7481](https://github.com/plotly/plotly.js/pull/7481)]

‎src/assets/geo_assets.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
'use strict';
22

3-
// TODO: Remove comments from Antarctica, Oceania during new maps release PR
43
const topojson = {
54
africa_110m: require('../../dist/topojson/africa_110m.json'),
6-
// antarctica_110m: require('../../dist/topojson/antarctica_110m.json'),
5+
antarctica_110m: require('../../dist/topojson/antarctica_110m.json'),
76
asia_110m: require('../../dist/topojson/asia_110m.json'),
87
europe_110m: require('../../dist/topojson/europe_110m.json'),
98
'north-america_110m': require('../../dist/topojson/north-america_110m.json'),
10-
// oceania_110m: require('../../dist/topojson/oceania_110m.json'),
9+
oceania_110m: require('../../dist/topojson/oceania_110m.json'),
1110
'south-america_110m': require('../../dist/topojson/south-america_110m.json'),
1211
usa_110m: require('../../dist/topojson/usa_110m.json'),
1312
world_110m: require('../../dist/topojson/world_110m.json'),
1413
africa_50m: require('../../dist/topojson/africa_50m.json'),
15-
// antarctica_50m: require('../../dist/topojson/antarctica_50m.json'),
14+
antarctica_50m: require('../../dist/topojson/antarctica_50m.json'),
1615
asia_50m: require('../../dist/topojson/asia_50m.json'),
1716
europe_50m: require('../../dist/topojson/europe_50m.json'),
1817
'north-america_50m': require('../../dist/topojson/north-america_50m.json'),
19-
// oceania_50m: require('../../dist/topojson/oceania_50m.json'),
18+
oceania_50m: require('../../dist/topojson/oceania_50m.json'),
2019
'south-america_50m': require('../../dist/topojson/south-america_50m.json'),
2120
usa_50m: require('../../dist/topojson/usa_50m.json'),
2221
world_50m: require('../../dist/topojson/world_50m.json'),

‎tasks/cdn_publish.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,11 @@ for path in `ls $dist/plotly*`; do
2929
done
3030

3131
# copy topojson files over to the sync folder
32-
# NOTE: Temporarily adding the suffix '_un' to avoid overwriting the old topojson
33-
# which some old plots might depend on
34-
for filepath in $dist/topojson/*.json; do
35-
f=${filepath##*/}
36-
f=${f%.*}
37-
cp $filepath "$sync/${f%.*}_un.json"
38-
done
32+
# NOTE: Temporarily syncing topojson to 'un' folder to avoid overwriting the old topojson
33+
# which some old plots might depend on. These can be accessed by setting 'topojsonURL' to
34+
# 'https://cdn.plot.ly/un/' in the Plotly config.
35+
mkdir $sync/un
36+
cp $dist/topojson/* $sync/un
3937

4038
# list folder and files
4139
echo $sync

‎topojson/bin/process_geodata.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,6 @@ async function convertLayersToTopojson({ name, resolution }) {
242242

243243
// Get required polygon features from UN GeoJSON
244244
const inputFilePathUNGeojson = `${inputDir}/${unFilename}.geojson`;
245-
// await mapshaper.runCommands(`${inputFilePathUNGeojson} -filter 'stscod !== undefined' target=1 -clean target=1 -o force ${inputFilePathUNGeojson}`)
246245
const outputFilePathAntarctica50m = `${outputDirGeojson}/${unFilename}_50m/antarctica.geojson`;
247246
const outputFilePathFiji50m = `${outputDirGeojson}/${unFilename}_50m/fiji.geojson`;
248247
const outputFilePathFijiAntimeridian50m = `${outputDirGeojson}/${unFilename}_50m/fiji_antimeridian.geojson`;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /