Skip to content

Commit 55733fb

Browse files
authored
Merge pull request #17 from matthiasfeist/master
Added example image to featureToH3Set
2 parents 14232e9 + f2ec9c2 commit 55733fb

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install geojson2h3
1515

1616
## Example Usage
1717

18-
```
18+
```javascript
1919
import geojson2h3 from 'geojson2h3';
2020

2121
const polygon = {
@@ -57,11 +57,13 @@ const feature = geojson2h3.h3SetToFeature(hexagons);
5757
<a name="module_geojson2h3.featureToH3Set"></a>
5858

5959
### geojson2h3.featureToH3Set(feature, resolution) ⇒ <code>Array.&lt;String&gt;</code>
60-
Convert a GeoJSON feature to a set of hexagons. Only hexagons whose centers
61-
fall within the feature will be included. Note that conversion from GeoJSON
60+
Convert a GeoJSON feature to a set of hexagons. *Only hexagons whose centers
61+
fall within the feature will be included.* Note that conversion from GeoJSON
6262
is lossy; the resulting hexagon set only approximately describes the original
6363
shape, at a level of precision determined by the hexagon resolution.
6464

65+
![featureToH3Set](./doc-files/featureToH3Set.png)
66+
6567
**Kind**: static method of [<code>geojson2h3</code>](#module_geojson2h3)
6668
**Returns**: <code>Array.&lt;String&gt;</code> - H3 indexes
6769

doc-files/README.md.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ npm install geojson2h3
1515

1616
## Example Usage
1717

18-
```
18+
```javascript
1919
import geojson2h3 from 'geojson2h3';
2020
2121
const polygon = {

doc-files/featureToH3Set.png

62.5 KB
Loading

src/geojson2h3.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,12 @@ function featureCollectionToH3Set(featureCollection, resolution) {
6969
// Public API functions
7070

7171
/**
72-
* Convert a GeoJSON feature to a set of hexagons. Only hexagons whose centers
73-
* fall within the feature will be included. Note that conversion from GeoJSON
72+
* Convert a GeoJSON feature to a set of hexagons. *Only hexagons whose centers
73+
* fall within the feature will be included.* Note that conversion from GeoJSON
7474
* is lossy; the resulting hexagon set only approximately describes the original
7575
* shape, at a level of precision determined by the hexagon resolution.
76+
*
77+
* ![featureToH3Set](./doc-files/featureToH3Set.png)
7678
* @static
7779
* @param {Object} feature Input GeoJSON: type must be either `Feature` or
7880
* `FeatureCollection`, and geometry type must be

0 commit comments

Comments
 (0)