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

Shape ingestion support #539

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Shape ingestion support #539

wants to merge 2 commits into from

Conversation

lokkju
Copy link

@lokkju lokkju commented Sep 25, 2023

👋 I have added the ability to optionally ingest shapes

actually returning shape geometry from elasticsearch depends on other changes in schema and api; those pull requests are also being created, and the entire stack can be seen here: https://github.com/lokkju/pelias-us-shape-autocomplete


Here's the reason for this change 🚀

admin region boundary display has been a long desired feature, but it should be optional as it increases index size. This changeset enables the optional ingestion of boundaries from whosonfirst data into the pelias-schema shape field.


Here's what actually got changed 👏

  • added an importShapes option to the config, defaulting to false
  • changed the extractFields signature to accept a wofConfig object
  • added the extraction of the geometry field to the extractFields module
  • in the peliasDocGenerators module, set the doc shape if a geometry field exists
  • added and fixed up existing tests

Here's how others can test the changes 👀

Unit tests were added, and the full stack of changesets can be tried from the above repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant