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

[FEATURE REQUEST] Link ADM2 boundaries to ADM1 entities in geojson properties #4202

Open
brettonw opened this issue Dec 15, 2024 · 1 comment

Comments

@brettonw
Copy link

Is your feature request related to a problem you run into when using geoBoundaries? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I load ADM1, ADM2, or smaller boundaries, the properties object contains a shapeGroup identifier that can be used to link to the ADM0 data, but nothing that specifies how the ADM2 and ADM1 data are related.

Describe the solution you'd like
A clear and concise description of what you want to happen.

I would like an additional property that specifies the immediate superior jurisdiction boundary. For instance, If I have Harris county from the ADM2 boudnaries, I would like to know that the corresponding ADM1 boundary is Texas.

When the properties: { "ShapeType": "ADM2" }, then you could add `properties: { "ADM1": "..." }, similarly repeated for ADM3 (specify the ADM2), and etc. Or you could use the word "parent" or some such nomenclature, for a more consistent structure.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I've tried generating random sample points within the ADM2 polygons and testing the ADM1 polygons for containment, but this is not a perfect solution and is rather brute force.

Additional context
Add any other context or screenshots about the feature request here.

@brettonw
Copy link
Author

brettonw commented Dec 16, 2024

USA-ADM2-mappings.json
MEX-ADM2-mappings.json

Using the point location method I mentioned above (imperfect, I know), I captured these outputs. I am unsure of their accuracy. For Mexico, I was not successful at locating the ADM1 correspondence for these ADM2 names using the point location method:

Ensenada
La Paz
Los Cabos
Othón P. Blanco
Mazatlán
Veracruz
Celestún

I can manually look these up in Google, but it would be really great if the correspondence was already present.

I did this just for illustrative purposes. The list of ADM2 boundaries inside an ADM1 boundary might not be unique...

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

No branches or pull requests

1 participant