Skip to content

Conversation

camdecoster
Copy link
Contributor

@camdecoster camdecoster commented Sep 9, 2025

Description

Omit Canadian provinces from USA subunits and snap polygons for land, coastlines topojson layers.

Closes #7528.

Changes

  • Update topojson processing script
  • Update topojson maps
  • Update Biome config
  • Update test baseline images

Screenshots

Description Before After
USA Subunits image image
Coastlines image image

Testing

  • Run the build script and see if it completes successfully: cd topojson && npm run build
  • Load the new maps in Mapshaper and see if they look alright
    • Drag a map file into the Mapshaper web app
  • Make sure CI passes the mock image diff checks

TODO

  • Add draftlog
  • Update test baseline images (if needed)

@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken labels Sep 10, 2025
@camdecoster camdecoster marked this pull request as ready for review September 11, 2025 01:27
@camdecoster camdecoster requested a review from emilykl September 11, 2025 15:11
"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.


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

😄

Copy link
Contributor

@emilykl emilykl left a comment

Choose a reason for hiding this comment

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

🚀

@camdecoster camdecoster merged commit b04398c into master Sep 11, 2025
6 checks passed
@camdecoster camdecoster deleted the cam/7528/fix-subunits-coastlines-topojson branch September 11, 2025 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Subunits layer for USA includes slivers of Canadian provinces
3 participants