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

Update docs to match h3-py v4.x #938

Merged
merged 27 commits into from
Oct 27, 2024
Merged

Update docs to match h3-py v4.x #938

merged 27 commits into from
Oct 27, 2024

Conversation

ajfriend
Copy link
Contributor

@ajfriend ajfriend commented Oct 22, 2024

Update the cells <> polygon functions in the h3geo.org docs to match h3-py v4.x.

Update: Also rework the h3geo.org docs so that language-agnostic function descriptions are given first, and language-specific details are given below the language tabs.

This also fixes some bugs in the docs that I found along the way.

@coveralls
Copy link

coveralls commented Oct 22, 2024

Coverage Status

coverage: 98.783% (+0.001%) from 98.782%
when pulling f5cd869 on aj/py4_docs
into 09d96cd on master.

@ajfriend
Copy link
Contributor Author

ajfriend commented Oct 22, 2024

One issue I see in the docs, however, is that the text below is shown for all the languages, but may not apply to all equally:

polygonToCells takes a given GeoJSON-like data structure and preallocated, zeroed memory, and fills it with the hexagons that are contained by the GeoJSON-like data structure.

Containment is determined by the cells' centroids. A partitioning using the GeoJSON-like data structure, where polygons cover an area without overlap, will result in a partitioning in the H3 grid, where cells cover the same area without overlap.

The Python function does not take a GeoJSON-like data structure, for example.

Would it make sense to have some of the text be language-specific?

@isaacbrodsky
Copy link
Collaborator

One issue I see in the docs, however, is that the text below is shown for all the languages, but may not apply to all equally:

polygonToCells takes a given GeoJSON-like data structure and preallocated, zeroed memory, and fills it with the hexagons that are contained by the GeoJSON-like data structure.
Containment is determined by the cells' centroids. A partitioning using the GeoJSON-like data structure, where polygons cover an area without overlap, will result in a partitioning in the H3 grid, where cells cover the same area without overlap.

The Python function does not take a GeoJSON-like data structure, for example.

Would it make sense to have some of the text be language-specific?

Maybe it should be written more generally, and the parts specific to the C api placed under the appropriate tab. Preallocated memory does not apply to any of the bindings.

@ajfriend
Copy link
Contributor Author

image image

@ajfriend
Copy link
Contributor Author

Maybe it should be written more generally, and the parts specific to the C api placed under the appropriate tab. Preallocated memory does not apply to any of the bindings.

I took a stab as an example. Let me know what you think!

@ajfriend ajfriend requested a review from isaacbrodsky October 23, 2024 21:11
@ajfriend
Copy link
Contributor Author

I don't think we explain the difference between "centroid" and "center" in the docs, but we should. The old description here makes a distinction: e3a48ad

@ajfriend
Copy link
Contributor Author

This is ready for review. I made a bunch of changes, so I'll re-request.

website/docs/api/directededge.mdx Outdated Show resolved Hide resolved
website/docs/api/directededge.mdx Show resolved Hide resolved
website/docs/api/hierarchy.mdx Show resolved Hide resolved
website/docs/api/inspection.mdx Show resolved Hide resolved
website/docs/api/inspection.mdx Show resolved Hide resolved
@isaacbrodsky isaacbrodsky merged commit f0d6cd4 into master Oct 27, 2024
38 checks passed
@isaacbrodsky isaacbrodsky deleted the aj/py4_docs branch October 27, 2024 16:41
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.

4 participants