Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple layers per include file #181

Open
keichan34 opened this issue Oct 18, 2024 · 0 comments
Open

Support multiple layers per include file #181

keichan34 opened this issue Oct 18, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@keichan34
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Discussion: #114

When multiple layers are always related (for example, road lines + road casing or building fill and building outline), it can be cumbersome and error-prone to include multiple files for the same logical layer group.

Describe the solution you'd like
When importing layers, !!inc/file should be able to import multiple layers from one file.

Describe alternatives you've considered

  • flatten the layers array after processing
  • patch !!inc/file to flatten a root array when importing ← this is probably dangerous because when you're importing filters, you normally want to preserve the array structure, potentially leading to breaking changes
  • create a new !!inc/layer function that flattens the root array

I think flattening the layers array is the best option for going forward with this? I don't expect the layers array to support nested arrays in future versions, and I don't think creating a new !!inc/layer function is warranted if it's just for this. If it supported something else that would be specific to importing layers, then maybe...

Additional context
n/a

@keichan34 keichan34 added enhancement New feature or request good first issue Good for newcomers labels Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant