Comments (5)
So assignment to a polygon is based on the location of the center points of the hexagons.
This was chosen because if you have two perfectly contiguous polygons, the entire hexagon grid will be assigned to only one polygon, instead of potentially two, maintaining the contiguous nature of the two polygons after the polyfill.
To get the behavior you appear to desire - any hexagon that touches the polygon is included - you can simply expand the polygon by the edge length of the hexagons. This page describes how to do this perfectly, but this simpler algorithm would probably suffice.
from h3-java.
Actually expanding by the edge length is insufficient.
See:
https://observablehq.com/@rustyconover/ensuring-h3-polyfill-returns-all-hexagons-for-a-polygon
You may need to expand by edge length * 2.0.
from h3-java.
You only need to expand around the polygon by the edge length. You're confusing a border around an arbitrary polygon with a radius.
To create a border equal to the edge length for a circle you need to add 2 times the edge length to it, but the length of the distance between an arbitrary point on the circle and the closest point on the expanded circle would be just the edge length.
from h3-java.
@dfellis understanding and implementation Minkowski sum is quite time consumming. May be it will be better if we add some optional boolean parameter to polyfill
function which as default will be work in old way - but if someone set it to true then the result will be minimal set of hexagons which cover input polygon?
That would save a lot of time for many people
from h3-java.
@dfellis understanding and implementation Minkowski sum is quite time consumming. May be it will be better if we add some optional boolean parameter to
polyfill
function which as default will be work in old way - but if someone set it to true then the result will be minimal set of hexagons which cover input polygon?That would save a lot of time for many people
@kamil-kielczewski work has already started on adding multiple polyfill modes in the planned 4.0 of H3. If you wish to save a lot of time for many people, feel free to help getting this over the line sooner.
from h3-java.
Related Issues (20)
- java.io.IOException: No such file or directory in H3Core.newInstance() HOT 2
- Performance of a non-throwing API
- java.lang.UnsatisfiedLinkError on v4 in Windows HOT 2
- Upgrade h3 version in Java monorepo HOT 3
- Dockcross build failure on master HOT 1
- Error building cross-compile on M1 macbook (ARM) HOT 1
- linux-x86 fails to cross compile on M1 Mac
- Compact Cells Failing on Certain Large Polygons HOT 1
- Can't use H3 with Spring Boot HOT 1
- Build fail on ppc64 HOT 7
- How to generate the jar package with all the linux native objs ?
- CCLA Contact
- Add M1 CI step in Github Actions
- polygonToCells fails on a rectangular polygon
- Bump guava from 32.0.0-jre to 32.1.3-jre
- OperatingSystem Enum , getDirName toLowerCase() causes UnsatisfiedLinkError for Turkish Local HOT 1
- Why these are different h3.getToH3(..) and h3.h3ToParent(..)? HOT 2
- [Breaking change] Glibc version changed in 3.7.1 HOT 8
- Does Python have a similar module HOT 1
- java.lang.UnsatisfiedLinkError: Can't load library: /tmp/libh3-java6591047064313530667.so HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from h3-java.