Git Product home page Git Product logo

geojson2h3's Introduction

geojson2h3

test Coverage Status License npm version

The geojson2h3 library includes a set of utilities for conversion between GeoJSON polygons and H3 hexagon indexes, using h3-js.

Installation

npm install geojson2h3

Example Usage

import geojson2h3 from 'geojson2h3';

const polygon = {
  type: 'Feature',
  geometry: {
    type: 'Polygon',
    coordinates: [[
      [-122.47485823276713, 37.85878356045377],
      [-122.47504834087829, 37.86196795698972],
      [-122.47845104316997, 37.86010614563313],
      [-122.47485823276713, 37.85878356045377]
    ]]
  }
};

const hexagons = geojson2h3.featureToH3Set(polygon, 10);
// -> ['8a2830855047fff', '8a2830855077fff', '8a283085505ffff', '8a283085506ffff']

const feature = geojson2h3.h3SetToFeature(hexagons);
// -> {type: 'Feature', properties: {}, geometry: {type: 'Polygon', coordinates: [...]}}

API Reference

geojson2h3


geojson2h3.featureToH3Set(feature, resolution, [options]) ⇒ Array.<String>

Convert a GeoJSON feature to a set of hexagons. Only hexagons whose centers fall within the feature will be included. Note that conversion from GeoJSON is lossy; the resulting hexagon set only approximately describes the original shape, at a level of precision determined by the hexagon resolution.

If the polygon is small in comparison with the chosen resolution, there may be no cell whose center lies within it, resulting in an empty set. To fall back to a single H3 cell representing the centroid of the polygon in this case, use the ensureOutput option.

featureToH3Set

Kind: static method of geojson2h3
Returns: Array.<String> - H3 indexes

Param Type Description
feature Object Input GeoJSON: type must be either Feature or FeatureCollection, and geometry type must be either Polygon or MultiPolygon
resolution Number Resolution of hexagons, between 0 and 15
[options] Object Options
[options.ensureOutput] Boolean Whether to ensure that at least one cell is returned in the set

geojson2h3.h3ToFeature(hexAddress, [properties]) ⇒ Feature

Convert a single H3 hexagon to a Polygon feature

Kind: static method of geojson2h3
Returns: Feature - GeoJSON Feature object

Param Type Description
hexAddress String Hexagon address
[properties] Object Optional feature properties

geojson2h3.h3SetToFeature(hexagons, [properties]) ⇒ Feature

Convert a set of hexagons to a GeoJSON Feature with the set outline(s). The feature's geometry type will be either Polygon or MultiPolygon depending on the number of outlines required for the set.

h3SetToFeature

Kind: static method of geojson2h3
Returns: Feature - GeoJSON Feature object

Param Type Description
hexagons Array.<String> Hexagon addresses
[properties] Object Optional feature properties

geojson2h3.h3SetToMultiPolygonFeature(hexagons, [properties]) ⇒ Feature

Convert a set of hexagons to a GeoJSON MultiPolygon feature with the outlines of each individual hexagon.

h3SetToMultiPolygonFeature

Kind: static method of geojson2h3
Returns: Feature - GeoJSON Feature object

Param Type Description
hexagons Array.<String> Hexagon addresses
[properties] Object Optional feature properties

geojson2h3.h3SetToFeatureCollection(hexagons, [getProperties]) ⇒ FeatureCollection

Convert a set of hexagons to a GeoJSON FeatureCollection with each hexagon in a separate Polygon feature with optional properties.

h3SetToFeatureCollection

Kind: static method of geojson2h3
Returns: FeatureCollection - GeoJSON FeatureCollection object

Param Type Description
hexagons Array.<String> Hexagon addresses
[getProperties] function Optional function returning properties for a hexagon: f(h3Index) => Object

Development

The geojson2h3 library uses yarn as the preferred package manager. To install the dev dependencies, just run:

yarn

To run the tests in both native ES6 (requires Node >= 6) and transpiled ES5:

yarn test

To format the code:

yarn prettier

To rebuild the API documentation in the README file:

yarn build-docs

Contributing

Pull requests and Github issues are welcome. Please include tests for new work, and keep the library test coverage at 100%. Before we can merge your changes, you must agree to the Uber Contributor License Agreement.

Legal and Licensing

The geojson2h3 library is licensed under the Apache 2.0 License.

geojson2h3's People

Contributors

dependabot[bot] avatar heshan0131 avatar isaacbrodsky avatar matthiasfeist avatar nrabinowitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

geojson2h3's Issues

Conversion into Feature Set

Hi,

I am doing a small prototype app for a research project of mine. I am running into an issue with h3SetToFeatureCollection where upon further inspection the coordinates are not even near the area of my polygon. I took a screen shot of the output cells of my polygon in h3 index longs and converted one of the hexagons into a lat long to verify that my hexagons where in the right area (New York coordinates). My coordinates once converted to h3SetToFeature are wrong and as a result not showing up on my map. I have a work around of just building my own function along with the h3 api functions. But I am wondering if I am just not doing something right.

Screen Shot 2022-01-22 at 1 33 13 PM

Inconsitency in MultiPolygon creation

I am using H3 and geojson2h3 in one of my private hobby projects and I am amazed: Both of the libraries work really well, the documentation is good and the ressources online are great! Thanks a lot for contributing this the world of open source!

However, I experience some inconsistencies in the creation of a MultiPolygon which I tracked down to this:
This is the resulting MultiPolygon I am creating with geojson2h3.h3SetToFeature(h3Hashes)

{"type":"Feature","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[13.49497567794005,52.46378348652058],[13.494993170284177,52.463549577744615],[13.495362825771174,52.46345433085213],[13.495380316697625,52.46322042065942],[13.495749970304372,52.46312517180159],[13.496102134993167,52.46326383282552],[13.49647178872812,52.463168581691384],[13.496823956016264,52.46330724067668],[13.497193609879293,52.46321198726623],[13.497211094445705,52.46297807518144],[13.49758074642832,52.462882819805635],[13.497932915852894,52.46302147620362],[13.498302567963396,52.4629262185515],[13.498654739987066,52.463064872910785],[13.498637260363164,52.46329878547084],[13.498989435448827,52.46343743834003],[13.498971956878643,52.46367134972101],[13.499324135026372,52.46381000110009],[13.499693791281187,52.46371474054954],[13.500045972027895,52.46385338988981],[13.500028496982816,52.46408730032926],[13.500380680791526,52.464225948179354],[13.500363206800284,52.464459857439685],[13.499993546528907,52.46455511861238],[13.499976071120086,52.46478902645602],[13.499606408967976,52.46488428566334],[13.4995889321415,52.465118192090294],[13.499941119938635,52.46525683954746],[13.499923644166008,52.465490744795254],[13.499553978124785,52.465586002348324],[13.49920178986456,52.4654473543425],[13.498832123950988,52.46554260961911],[13.498479938289941,52.46540395957444],[13.49811027250415,52.46549921257462],[13.49775808944237,52.465360560491106],[13.497388423784448,52.46545581121485],[13.497036243322006,52.46531715709255],[13.496666577792087,52.46541240553988],[13.496314399929101,52.4652737493788],[13.49594473452729,52.465368995549724],[13.49559255926383,52.46523033734992],[13.495222893990274,52.46532558124446],[13.49487072132646,52.465186921005944],[13.494888214398847,52.46495301742154],[13.494536044797348,52.46481435569302],[13.49455353892328,52.46458045092959],[13.494923200179457,52.464485207656956],[13.494940692887726,52.464251301476764],[13.495310352263626,52.46415605623874],[13.495327843554149,52.46392214864179],[13.49497567794005,52.46378348652058]]],[[[13.498427495415536,52.466105668700635],[13.498444976494971,52.46587176652386],[13.498814644289261,52.465776513212624],[13.499166833012522,52.46591516176709],[13.499149354404604,52.46614906418147],[13.498779684601866,52.46624431780379],[13.498427495415536,52.466105668700635]]],[[[13.497318484637916,52.46639141849633],[13.49733596960653,52.46615751797389],[13.497705639153583,52.466062268904494],[13.49805782574059,52.4662009200465],[13.498040343243444,52.466434820806555],[13.498392532892755,52.466573470458336],[13.498762204576247,52.46647821880142],[13.499114396824853,52.46661686641432],[13.49909691785302,52.466850766232795],[13.49872724416107,52.4669460182008],[13.498375051449424,52.466807370039234],[13.498005377885224,52.46690261973073],[13.497653187772961,52.46676396953028],[13.497670671687812,52.466530070186984],[13.497318484637916,52.46639141849633]]],[[[13.500593080563103,52.46623584219694],[13.500610554227995,52.46600193930746],[13.500258360306498,52.46586329483082],[13.500275835025265,52.46562939076217],[13.500645501194002,52.465534130932646],[13.500997694652256,52.46567277486063],[13.50098022240501,52.465906679166814],[13.501332418925465,52.4660453216045],[13.501314947732144,52.466279224731494],[13.500945277546792,52.46637448518327],[13.500593080563103,52.46623584219694]]],[[[13.498657321875152,52.46788160661587],[13.498674802628589,52.46764771081006],[13.499044480209893,52.467552460496364],[13.499396679046276,52.4676911056774],[13.499379200764466,52.46792500172075],[13.499731402663297,52.46806364541143],[13.50010108238076,52.467968392510066],[13.500453286878818,52.46810703416175],[13.500435812122603,52.468340929263434],[13.500066130396657,52.46843618247594],[13.499713925435387,52.4682975402756],[13.499344243837005,52.46839279121152],[13.498992041475086,52.46825414697217],[13.499009521174628,52.46802025234555],[13.498657321875152,52.46788160661587]]],[[[13.499484068636026,52.46652161248091],[13.499501546190112,52.4662877112457],[13.499871216120518,52.46619245534691],[13.500223410505196,52.46633110037223],[13.500205935422624,52.46656500184496],[13.499836263483854,52.46666025805489],[13.499484068636026,52.46652161248091]]],[[[13.502936237614112,52.46884359901163],[13.502953703901001,52.46860970437674],[13.503323386136076,52.46851444205782],[13.503675604092471,52.468653074062516],[13.503658140277414,52.46888696893485],[13.5032884560341,52.468982231564986],[13.502936237614112,52.46884359901163]]],[[[13.50496227844855,52.47084482745795],[13.505331972733156,52.470749563271326],[13.505684209064224,52.47088818633229],[13.505666751574495,52.4711220741286],[13.506018990968077,52.47126069569885],[13.506001534532665,52.471494582315756],[13.506353776988805,52.471633202395246],[13.506723475416463,52.471537935309144],[13.507075720471224,52.47167655334916],[13.50744541902532,52.471581283986254],[13.507462870516498,52.471347396894714],[13.507832567188835,52.47125212556641],[13.508184814378012,52.47139074101821],[13.50855451117657,52.47129546741306],[13.50890676096414,52.471434080825325],[13.509276457888808,52.47133880494339],[13.509293903017939,52.4711049159606],[13.509663598060678,52.471009638113266],[13.509681041772144,52.47077574771382],[13.509328792913008,52.47063713539896],[13.509346237678919,52.47040324382005],[13.509715928831868,52.47030796431882],[13.509733372180154,52.47007407132324],[13.510103061451167,52.46997878985664],[13.510120503381822,52.46974489544442],[13.50976825851354,52.46960628273606],[13.509785701498688,52.4693723871444],[13.510155386880019,52.469277104023924],[13.510172828447535,52.46904320701562],[13.510542511946968,52.46894792192981],[13.510894755886603,52.46908653354084],[13.511264439511834,52.46899124617826],[13.511616686049269,52.469129855749756],[13.511986369800155,52.469034566110416],[13.512003805005985,52.46880066721106],[13.512373486874827,52.468705375606426],[13.512725735545455,52.46884398258966],[13.513095417539772,52.46874868870825],[13.513447668807924,52.46888729365189],[13.51343023854635,52.46912119302556],[13.513782492876619,52.469259796478234],[13.513765063669684,52.46949369467246],[13.51411732106208,52.46963229663409],[13.514487007196742,52.46953699985285],[13.51483926718656,52.46967559977479],[13.514821841506523,52.469909497026656],[13.51445215336442,52.47000479411947],[13.514434726266844,52.47023868995472],[13.514786989783646,52.47037728893429],[13.514769563740789,52.470611183590044],[13.51439987170889,52.47070647902913],[13.51438244424849,52.47094037226827],[13.514734711292325,52.471078970305385],[13.514717284886679,52.47131286236501],[13.51434758896485,52.471408156150375],[13.514330161141613,52.471642046793356],[13.513960463337453,52.47173733861342],[13.513608195364094,52.47159873947891],[13.513238497685196,52.471694029022046],[13.512886232309535,52.47155542784775],[13.512516534756042,52.47165071511401],[13.512499100570492,52.471884603866094],[13.512129401134784,52.471979889167],[13.51211196553158,52.47221377650241],[13.512464231836452,52.47235237877409],[13.512446797287938,52.472586264929966],[13.512077093962187,52.47268154857705],[13.512059657995975,52.47291543331628],[13.511689952787975,52.47301071499799],[13.511672515404038,52.47324459832052],[13.512024785700515,52.473383200198526],[13.512007349371272,52.47361708234153],[13.511637640273133,52.47371236236939],[13.511285369512116,52.47357375994268],[13.510915660539668,52.47366903769357],[13.510563392376802,52.47353043322709],[13.510193683530138,52.47362570870104],[13.50984141796554,52.473487102194824],[13.50947170924476,52.47358237539183],[13.509119446278502,52.4734437668459],[13.5087497376838,52.47353903776601],[13.508397477315967,52.47340042718039],[13.508027768847404,52.47349569582357],[13.508010318738497,52.47372957536386],[13.50836257957048,52.473868186498194],[13.508345130516089,52.47410206485898],[13.508697394410802,52.47424067450234],[13.509067106895696,52.4741454052362],[13.509419373388925,52.47428401283987],[13.50940192786148,52.474517890258376],[13.509754197417445,52.474656496371004],[13.509736752944615,52.47489037260998],[13.509367036443413,52.474985642499135],[13.509349590552741,52.47521951732137],[13.50897987216936,52.47531478524505],[13.508962424860844,52.47554865865053],[13.509314698408174,52.47568726436954],[13.509297252154289,52.4759211365955],[13.509649528764482,52.47605974082342],[13.510019251164271,52.475964472276694],[13.510371530372964,52.47610307446478],[13.510354087646299,52.47633694574832],[13.510706369917894,52.47647554644527],[13.510688928245933,52.47670941654925],[13.511041213580397,52.476848015755],[13.511410940122357,52.476752744308065],[13.511763228055223,52.47689134147389],[13.511745789910698,52.47712521063539],[13.512098080906476,52.47726380630998],[13.512080643816734,52.47749767429185],[13.511710913258522,52.477592946362],[13.511693474750873,52.4778268129271],[13.511323742310164,52.477922083031764],[13.51097145038527,52.4777834862597],[13.510601718070316,52.47787875408724],[13.510249428743945,52.4777401552752],[13.509879696554846,52.47783542082562],[13.509862251683826,52.47806928549968],[13.509492517612367,52.478164549084575],[13.509475071323369,52.47839841234185],[13.509827361578573,52.47853701225138],[13.510197097658386,52.4784417483549],[13.510214541474632,52.47820788486049],[13.510584275672006,52.47811261899845],[13.510936568061426,52.478251216319265],[13.511306302384611,52.4781559481801],[13.511658597372522,52.478294543460926],[13.5116411585018,52.47852840742963],[13.511993456552723,52.47866700121913],[13.512363193009786,52.478571730491204],[13.51271549365914,52.478710322240616],[13.512698058316081,52.47894418526675],[13.513050362028501,52.47908277552483],[13.51303292774036,52.479316637371255],[13.513385234515814,52.47945522613795],[13.51375497511462,52.47935995250947],[13.51410728448837,52.479498539236],[13.514089853728091,52.47973240013975],[13.514442166164919,52.47987098537483],[13.514424736459684,52.480104845098865],[13.51405499184463,52.4802001193508],[13.514037560721425,52.48043397765806],[13.513667814223561,52.48052924994447],[13.513650381682348,52.48076310683496],[13.514002698112064,52.48090169167609],[13.513985266625888,52.48113554738683],[13.513615516236985,52.48123081801942],[13.513598083332768,52.481464672313365],[13.513228331060986,52.4815599409804],[13.512876013701666,52.481421355041746],[13.512506261555341,52.48151662143147],[13.512153946794546,52.48137803345257],[13.511784194773796,52.48147329756502],[13.511766755505437,52.48170714996806],[13.51139700160194,52.48180241211493],[13.511044688975213,52.48166382154704],[13.510674935197487,52.48175908141662],[13.510322625169557,52.48162048880856],[13.510340069383904,52.481386636879726],[13.509987762419332,52.481248042780294],[13.510005207688524,52.48101418967175],[13.50965290378731,52.48087559408099],[13.509283154152458,52.48097085105002],[13.508930852850181,52.48083225341919],[13.508561103341439,52.48092750811097],[13.508543653126408,52.48116136074524],[13.508173901735237,52.481256613471416],[13.507821602567741,52.48111801325178],[13.507451851302886,52.48121326370075],[13.50709955473458,52.481074661441085],[13.50672980359611,52.481169909612845],[13.50671234701719,52.481403760355846],[13.506342593996436,52.48149900656197],[13.505990299563392,52.481360401713545],[13.505620546669244,52.481455645642455],[13.505268254835705,52.48131703875411],[13.505285716360259,52.481083188485606],[13.504933427590199,52.48094458010608],[13.504950890169367,52.48071072865798],[13.504598604462744,52.48057211878736],[13.50422885571304,52.480667359816096],[13.503876572606018,52.480528747905645],[13.503894038712499,52.480294895515215],[13.503541758668911,52.4801562821137],[13.503559225829862,52.47992242854369],[13.50392897056175,52.47982718813789],[13.504281250141558,52.47996580099063],[13.504650995000336,52.47987055830771],[13.50466845827044,52.47963670308353],[13.504316179154468,52.479498090779565],[13.504333643479075,52.479264234375805],[13.503981367426412,52.47912562058081],[13.503998832805552,52.47889176299749],[13.504368571764697,52.47879651897186],[13.50438603572571,52.4785626599717],[13.504755772802966,52.478467413980454],[13.50510804792795,52.47860602667792],[13.505477785132,52.478510778409635],[13.50583006285632,52.478649389067314],[13.506199800186996,52.47855413852192],[13.506217257784705,52.47832027763033],[13.505864980524333,52.478181667521405],[13.50588243917657,52.477947805450256],[13.505530164979376,52.47780919385028],[13.505547624686137,52.477575330599585],[13.505195353552107,52.477436717508624],[13.505212814313378,52.477202853078396],[13.505582543736175,52.47710760150184],[13.505600003079419,52.47687373565479],[13.505247735472363,52.47673512162157],[13.50526519587006,52.47650125459501],[13.504912931326071,52.47636263907087],[13.504930392778254,52.476128770864804],[13.504578131297274,52.47599015384975],[13.504595593803856,52.475756284464175],[13.50424333538591,52.475617665958254],[13.503873613997596,52.47571291628913],[13.50385614901863,52.475946785437344],[13.503486425748589,52.47604203380269],[13.503134169466232,52.47590341270844],[13.502764446323235,52.47599865879683],[13.502412192640328,52.475860035663004],[13.502042469624495,52.47595527947449],[13.502024998282817,52.47618914673113],[13.501655273385406,52.47628438857702],[13.501303021838533,52.47614576285494],[13.500933297068482,52.47624100242391],[13.50058104812133,52.47610237466236],[13.500598524407641,52.47586850788056],[13.500246278523598,52.47572987862827],[13.500263755864085,52.47549601066707],[13.499911513043196,52.4753573799241],[13.499541792418476,52.47545261659361],[13.499189552197388,52.47531398381123],[13.499207033064263,52.47508011490812],[13.49885479590625,52.47494148063511],[13.498872277827235,52.47470761055263],[13.499241994434035,52.47461237450563],[13.499259474936927,52.474378503006264],[13.499629189662507,52.47428326499368],[13.499646668747365,52.47404939207748],[13.499294435578825,52.47391075741135],[13.499311915717781,52.47367688331579],[13.499681626553244,52.473581643648885],[13.499699105274244,52.473347768136506],[13.500068814228475,52.473252526504034],[13.500421046470533,52.47339116007271],[13.500790755552273,52.473295916163444],[13.501142990393891,52.47343454769281],[13.501512699603046,52.473339301506776],[13.50153017196192,52.47310542410264],[13.501899879289713,52.473010175951046],[13.502252116267343,52.473148804892354],[13.502621823722363,52.473053554463974],[13.502974063299275,52.47319218136588],[13.502956595884681,52.473426059244865],[13.503308838524406,52.47356468465603],[13.503291372164062,52.47379856135563],[13.503643617866626,52.47393718527608],[13.504013329465856,52.47384193194824],[13.504030793353994,52.47360805501128],[13.503678548115102,52.47346943163954],[13.503696013057507,52.47323555352317],[13.504065720766631,52.47314029854117],[13.504083184291188,52.472906419008034],[13.503730942578752,52.47276779469426],[13.503748407157527,52.4725339139817],[13.503396168507843,52.47239528817723],[13.503413634140886,52.4721614062853],[13.503061398553877,52.472022778990144],[13.502691696870244,52.472118033038214],[13.502339463882407,52.47197940370368],[13.502356933041717,52.471745520869824],[13.502004703116587,52.47160689004468],[13.502022173330062,52.47137300603147],[13.502391870996671,52.47127775260596],[13.502409339792296,52.47104386717598],[13.502779035577566,52.47094861178501],[13.50313126457571,52.47108724151275],[13.503500960488072,52.47099198384504],[13.503853192085199,52.47113061153345],[13.503835728233572,52.471364497438266],[13.503466030312818,52.471459755417264],[13.50344856504339,52.47169363990532],[13.503800800166749,52.47183226665178],[13.503783335951548,52.47206614996046],[13.504135574137603,52.472204775216234],[13.504118110976664,52.47243865734555],[13.504470352225407,52.47257728111061],[13.504840056171378,52.47248202219763],[13.50485751686019,52.47224813983097],[13.504505276075198,52.47210951661462],[13.504522737818299,52.471875633068535],[13.504892437874329,52.471780372501456],[13.505244678195565,52.47191899516911],[13.505614378378343,52.47182373232524],[13.505631836231538,52.47158984712507],[13.505279596374077,52.4714512250061],[13.504909898199646,52.47154648753864],[13.504557660941016,52.47140786338028],[13.50457512232057,52.47117397723807],[13.504222888124541,52.471035351589016],[13.504240350558344,52.47080146426745],[13.504610044716221,52.470706202357576],[13.50496227844855,52.47084482745795]],[[13.506618749092853,52.472941238261484],[13.506636203782957,52.47270735659957],[13.506283954737686,52.47256873895296],[13.505914250538352,52.47266400241959],[13.505896793376014,52.4728978838442],[13.505527087294972,52.47299314534534],[13.50550962871483,52.47322702535321],[13.505861878687925,52.47336564409722],[13.50584442116217,52.47359952292564],[13.506196674198032,52.473738140178824],[13.506566384295768,52.47364287805486],[13.50658383934927,52.47340899898914],[13.50695354756518,52.473313734899726],[13.506971001200835,52.47307985441726],[13.506618749092853,52.472941238261484]],[[13.50513992075207,52.47332228488889],[13.504787673377868,52.473183664105356],[13.504417965541865,52.473278921364184],[13.504400503071631,52.47351279971794],[13.504752750909613,52.47365142105019],[13.505122460754054,52.473556163479984],[13.50513992075207,52.47332228488889]],[[13.506514018408383,52.47434451005961],[13.506866277569832,52.47448312433101],[13.506848823207365,52.47471699962102],[13.507201085431648,52.474855612401534],[13.507570801554323,52.47476034934327],[13.507588253444407,52.474526473815985],[13.507235991684201,52.474387861584205],[13.507253444628793,52.47415398487742],[13.506901185931362,52.47401537115473],[13.506531473825317,52.4741106335901],[13.506514018408383,52.47434451005961]],[[13.506691728493877,52.47682183828701],[13.506709183946644,52.47658797078588],[13.506356914204435,52.47644935934114],[13.505987188545511,52.476544614848805],[13.50596973062027,52.47677848211265],[13.506322000826454,52.47691709410614],[13.506304543955718,52.477150960190485],[13.50593481440629,52.477246214044044],[13.505917356117553,52.47748007871158],[13.506269629850797,52.47761868976281],[13.50625217261659,52.47785255325076],[13.506604449412944,52.47799116281095],[13.506974182979487,52.47789590833441],[13.507326462374955,52.47803451585478],[13.507696196067881,52.477939259101156],[13.508048478062312,52.4780778645817],[13.508418211881569,52.47798260555099],[13.508435661697897,52.477748741351306],[13.508083380167681,52.47761013641953],[13.507713648356875,52.4777053951387],[13.507361369425567,52.477566788167074],[13.50699163774113,52.477662044609175],[13.506639361408778,52.47752343559774],[13.506656817224956,52.47728957069296],[13.507026546900926,52.477194314562354],[13.507044001299105,52.47696044824075],[13.506691728493877,52.47682183828701]]]]}}

These are the H3 Hashes I am using to create the polygon:

const h3Hashes = ["8b1f18b28a55fff", "8b1f18b2d699fff", "8b1f18b2d750fff", "8b1f18b28af6fff", "8b1f18b2d676fff", "8b1f18b2d62efff", "8b1f18b2d625fff", "8b1f18b2d62cfff", "8b1f18b2d623fff", "8b1f18b28a53fff", "8b1f18b2d74bfff", "8b1f18b28af4fff", "8b1f18b2d674fff", "8b1f18b2d61bfff", "8b1f18b2d054fff", "8b1f18b2d749fff", "8b1f18b28af2fff", "8b1f18b2d672fff", "8b1f18b2d70bfff", "8b1f18b2d62afff", "8b1f18b2d06efff", "8b1f18b2d39bfff", "8b1f18b28ad6fff", "8b1f18b2d656fff", "8b1f18b2d620fff", "8b1f18b28a59fff", "8b1f18b2d604fff", "8b1f18b28a56fff", "8b1f18b2d619fff", "8b1f18b2d334fff", "8b1f18b2d745fff", "8b1f18b28af0fff", "8b1f18b2d670fff", "8b1f18b2d616fff", "8b1f18b2d332fff", "8b1f18b2d055fff", "8b1f18b2d06cfff", "8b1f18b2d398fff", "8b1f18b28ad4fff", "8b1f18b2d654fff", "8b1f18b2d72efff", "8b1f18b2d316fff", "8b1f18b2d065fff", "8b1f18b2d395fff", "8b1f18b28ad2fff", "8b1f18b2d652fff", "8b1f18b28a54fff", "8b1f18b2d74efff", "8b1f18b28af5fff", "8b1f18b2d675fff", "8b1f18b2d614fff", "8b1f18b2d330fff", "8b1f18b2d74afff", "8b1f18b28af3fff", "8b1f18b2d673fff", "8b1f18b2d709fff", "8b1f18b2d72cfff", "8b1f18b2d314fff", "8b1f18b2d063fff", "8b1f18b2d393fff", "8b1f18b28ad0fff", "8b1f18b2d650fff", "8b1f18b2d72afff", "8b1f18b2d312fff", "8b1f18b28a62fff", "8b1f18b2d61afff", "8b1f18b2d335fff", "8b1f18b2d748fff", "8b1f18b28af1fff", "8b1f18b2d671fff", "8b1f18b2d618fff", "8b1f18b2d333fff", "8b1f18b2d051fff", "8b1f18b2d06dfff", "8b1f18b2d399fff", "8b1f18b28ad5fff", "8b1f18b2d655fff", "8b1f18b2d728fff", "8b1f18b2d310fff", "8b1f18b2d066fff", "8b1f18b2d396fff", "8b1f18b28ad3fff", "8b1f18b2d653fff", "8b1f18b28a60fff", "8b1f18b2d60afff", "8b1f18b2d326fff", "8b1f18b2d3acfff", "8b1f18b28ae2fff", "8b1f18b2d662fff", "8b1f18b2d615fff", "8b1f18b2d331fff", "8b1f18b2d052fff", "8b1f18b2d38afff", "8b1f18b28ac6fff", "8b1f18b2d646fff", "8b1f18b2d754fff", "8b1f18b2d72dfff", "8b1f18b2d315fff", "8b1f18b2d05efff", "8b1f18b2d064fff", "8b1f18b2d394fff", "8b1f18b28ad1fff", "8b1f18b2d651fff", "8b1f18b2d72bfff", "8b1f18b2d313fff", "8b1f18b28a5bfff", "8b1f18b2d608fff", "8b1f18b2d324fff", "8b1f18b2d605fff", "8b1f18b2d322fff", "8b1f18b2d046fff", "8b1f18b2d388fff", "8b1f18b28ac4fff", "8b1f18b2d644fff", "8b1f18b2d755fff", "8b1f18b2d71efff", "8b1f18b2d306fff", "8b1f18b2d044fff", "8b1f18b2d385fff", "8b1f18b28ac2fff", "8b1f18b2d642fff", "8b1f18b2d729fff", "8b1f18b2d311fff", "8b1f18b2d058fff", "8b1f18b2d3a9fff", "8b1f18b28adefff", "8b1f18b2d65efff", "8b1f18b28a61fff", "8b1f18b2d0dbfff", "8b1f18b2d601fff", "8b1f18b2d320fff", "8b1f18b2d3adfff", "8b1f18b28ae3fff", "8b1f18b2d663fff", "8b1f18b2d71cfff", "8b1f18b2d304fff", "8b1f18b2d040fff", "8b1f18b2d381fff", "8b1f18b28ac0fff", "8b1f18b2d640fff", "8b1f18b2d746fff", "8b1f18b2d71afff", "8b1f18b2d302fff", "8b1f18b2d075fff", "8b1f18b2d3a6fff", "8b1f18b28adcfff", "8b1f18b2d65cfff", "8b1f18b2d736fff", "8b1f18b2d31efff", "8b1f18b2d073fff", "8b1f18b2d3a2fff", "8b1f18b28adafff", "8b1f18b2d65afff", "8b1f18b2d0d9fff", "8b1f18b28a5cfff", "8b1f18b2d716fff", "8b1f18b299b6fff", "8b1f18b2d609fff", "8b1f18b2d325fff", "8b1f18b2d606fff", "8b1f18b2d323fff", "8b1f18b2d050fff", "8b1f18b2d389fff", "8b1f18b28ac5fff", "8b1f18b2d645fff", "8b1f18b2d742fff", "8b1f18b2d718fff", "8b1f18b2d300fff", "8b1f18b2d045fff", "8b1f18b2d386fff", "8b1f18b28ac3fff", "8b1f18b2d643fff", "8b1f18b2d0ccfff", "8b1f18b2d734fff", "8b1f18b2d31cfff", "8b1f18b2d05bfff", "8b1f18b2d070fff", "8b1f18b2d39dfff", "8b1f18b28ad8fff", "8b1f18b2d658fff", "8b1f18b2d0cafff", "8b1f18b2d732fff", "8b1f18b2d31afff", "8b1f18b2d714fff", "8b1f18b299b4fff", "8b1f18b2d712fff", "8b1f18b299b2fff", "8b1f18b2d76cfff", "8b1f18b29996fff", "8b1f18b2d603fff", "8b1f18b2d321fff", "8b1f18b2d744fff", "8b1f18b28aeefff", "8b1f18b2d66efff", "8b1f18b2d71dfff", "8b1f18b2d305fff", "8b1f18b2d04afff", "8b1f18b2d042fff", "8b1f18b2d383fff", "8b1f18b28ac1fff", "8b1f18b2d641fff", "8b1f18b2d0ebfff", "8b1f18b2d71bfff", "8b1f18b2d303fff", "8b1f18b2d04efff", "8b1f18b2d076fff", "8b1f18b2d3a8fff", "8b1f18b28addfff", "8b1f18b2d65dfff", "8b1f18b2d0c8fff", "8b1f18b2d730fff", "8b1f18b2d318fff", "8b1f18b2d059fff", "8b1f18b2d074fff", "8b1f18b2d3a4fff", "8b1f18b28adbfff", "8b1f18b2d65bfff", "8b1f18b2d710fff", "8b1f18b299b0fff", "8b1f18b2d768fff", "8b1f18b29994fff", "8b1f18b2d765fff", "8b1f18b29992fff", "8b1f18b2d613fff", "8b1f18b2d32efff", "8b1f18b2d068fff", "8b1f18b2d3b4fff", "8b1f18b28aeafff", "8b1f18b2d66afff", "8b1f18b2d0e9fff", "8b1f18b2d740fff", "8b1f18b2d719fff", "8b1f18b2d301fff", "8b1f18b2d041fff", "8b1f18b2d062fff", "8b1f18b2d392fff", "8b1f18b28acefff", "8b1f18b2d64efff", "8b1f18b2d735fff", "8b1f18b2d31dfff", "8b1f18b2d05dfff", "8b1f18b2d071fff", "8b1f18b2d3a1fff", "8b1f18b28ad9fff", "8b1f18b2d659fff", "8b1f18b2d733fff", "8b1f18b2d31bfff", "8b1f18b2d715fff", "8b1f18b299b5fff", "8b1f18b2d713fff", "8b1f18b299b3fff", "8b1f18b2d763fff", "8b1f18b29990fff", "8b1f18b2d610fff", "8b1f18b2d32cfff", "8b1f18b2d3b2fff", "8b1f18b28ae8fff", "8b1f18b2d668fff", "8b1f18b2d60dfff", "8b1f18b2d32afff", "8b1f18b2d04cfff", "8b1f18b2d06bfff", "8b1f18b2d048fff", "8b1f18b2d06afff", "8b1f18b2d060fff", "8b1f18b2d390fff", "8b1f18b28accfff", "8b1f18b2d64cfff", "8b1f18b2d726fff", "8b1f18b2d30efff", "8b1f18b2d043fff", "8b1f18b2d05afff", "8b1f18b2d38dfff", "8b1f18b28acafff", "8b1f18b2d64afff", "8b1f18b2d731fff", "8b1f18b2d319fff", "8b1f18b2d704fff", "8b1f18b299a6fff", "8b1f18b2d711fff", "8b1f18b299b1fff", "8b1f18b2d76afff", "8b1f18b29995fff", "8b1f18b2d766fff", "8b1f18b29993fff", "8b1f18b2d60bfff", "8b1f18b2d328fff", "8b1f18b2d069fff", "8b1f18b2d3b5fff", "8b1f18b28aebfff", "8b1f18b2d66bfff", "8b1f18b2d741fff", "8b1f18b2d724fff", "8b1f18b2d30cfff", "8b1f18b2d053fff", "8b1f18b2d38bfff", "8b1f18b28ac8fff", "8b1f18b2d648fff", "8b1f18b2d722fff", "8b1f18b2d30afff", "8b1f18b2d702fff", "8b1f18b299a4fff", "8b1f18b2d700fff", "8b1f18b299a2fff", "8b1f18b2d75afff", "8b1f18b29986fff", "8b1f18b2d764fff", "8b1f18b29991fff", "8b1f18b2d612fff", "8b1f18b2d32dfff", "8b1f18b2d336fff", "8b1f18b2d3b3fff", "8b1f18b28ae9fff", "8b1f18b2d669fff", "8b1f18b2d74dfff", "8b1f18b2d60efff", "8b1f18b2d32bfff", "8b1f18b2d049fff", "8b1f18b2d061fff", "8b1f18b2d391fff", "8b1f18b28acdfff", "8b1f18b2d64dfff", "8b1f18b2d720fff", "8b1f18b2d308fff", "8b1f18b2d3a5fff", "8b1f18b2d05cfff", "8b1f18b2d38efff", "8b1f18b28acbfff", "8b1f18b2d64bfff", "8b1f18b2d3a3fff", "8b1f18b2d775fff", "8b1f18b299a0fff", "8b1f18b2d380fff", "8b1f18b2d758fff", "8b1f18b29984fff", "8b1f18b2d39cfff", "8b1f18b2d753fff", "8b1f18b29982fff", "8b1f18b2d39afff", "8b1f18b2d774fff", "8b1f18b2999efff", "8b1f18b2d76bfff", "8b1f18b2d60cfff", "8b1f18b2d329fff", "8b1f18b2d04dfff", "8b1f18b2d74cfff", "8b1f18b2d725fff", "8b1f18b2d30dfff", "8b1f18b2d04bfff", "8b1f18b2d056fff", "8b1f18b2d38cfff", "8b1f18b28ac9fff", "8b1f18b2d649fff", "8b1f18b2d723fff", "8b1f18b2d30bfff", "8b1f18b2d3a0fff", "8b1f18b2d703fff", "8b1f18b299a5fff", "8b1f18b2d384fff", "8b1f18b2d701fff", "8b1f18b299a3fff", "8b1f18b2d382fff", "8b1f18b2d751fff", "8b1f18b29980fff", "8b1f18b2d39efff", "8b1f18b2d772fff", "8b1f18b2999cfff", "8b1f18b2d769fff", "8b1f18b2d770fff", "8b1f18b2999afff", "8b1f18b2d721fff", "8b1f18b2d309fff", "8b1f18b2d776fff", "8b1f18b299a1fff", "8b1f18b2d759fff", "8b1f18b29985fff", "8b1f18b2d756fff", "8b1f18b29983fff", "8b1f18b2d76dfff", "8b1f18b29998fff", "8b1f18b2d70efff", "8b1f18b299aefff", "8b1f18b2d752fff", "8b1f18b29981fff", "8b1f18b2d773fff", "8b1f18b2999dfff", "8b1f18b2d771fff", "8b1f18b2999bfff", "8b1f18b2d70cfff", "8b1f18b299acfff", "8b1f18b2d708fff", "8b1f18b299aafff", "8b1f18b2d762fff", "8b1f18b2998efff", "8b1f18b2d76efff", "8b1f18b29999fff", "8b1f18b2d705fff", "8b1f18b299a8fff", "8b1f18b2d760fff", "8b1f18b2998cfff", "8b1f18b2d75dfff", "8b1f18b2998afff", "8b1f18b2d70dfff", "8b1f18b299adfff", "8b1f18b2d70afff", "8b1f18b299abfff", "8b1f18b2d75bfff", "8b1f18b29988fff", "8b1f18b2d706fff", "8b1f18b299a9fff", "8b1f18b2d761fff", "8b1f18b2998dfff", "8b1f18b2d75efff", "8b1f18b2998bfff"]

And these are the points expressed through latitude/longitude ([long, lat]) which I used to create the the H3 hashes. The points are at the center of each H3 hash which I got through cellTolatLng. I rounded them to five decimal places which gives me an accuracy of 1.11m at the equator (http://wiki.gis.com/wiki/index.php/Decimal_degrees). The location you are seeing is located in Berlin.

[[13.50371, 52.473], [13.50389, 52.47548], [13.50391, 52.48006], [13.50394, 52.47478], [13.504, 52.47408], [13.50405, 52.47337], [13.50425, 52.48043], [13.50428, 52.47515], [13.5043, 52.47973], [13.50433, 52.47445], [13.50435, 52.47903], [13.50438, 52.47375], [13.50444, 52.47305], [13.50461, 52.47552], [13.50463, 52.4801], [13.50467, 52.47482], [13.50469, 52.4794], [13.50472, 52.47412], [13.50474, 52.4787], [13.50477, 52.47342], [13.50497, 52.48048], [13.505, 52.47519], [13.50502, 52.47978], [13.50505, 52.47449], [13.50507, 52.47907], [13.50511, 52.47379], [13.50516, 52.47309], [13.50534, 52.47557], [13.50536, 52.48015], [13.50539, 52.47486], [13.50541, 52.47945], [13.50544, 52.47416], [13.50546, 52.47874], [13.50549, 52.47346], [13.50567, 52.47594], [13.50569, 52.48052], [13.50572, 52.47524], [13.50574, 52.47982], [13.50577, 52.47454], [13.5058, 52.47912], [13.50583, 52.47383], [13.50588, 52.47313], [13.506, 52.47631], [13.50606, 52.47561], [13.50608, 52.48019], [13.50611, 52.47491], [13.50613, 52.47949], [13.50616, 52.47421], [13.50618, 52.47879], [13.50621, 52.4735], [13.50623, 52.47809], [13.50639, 52.47598], [13.50641, 52.48056], [13.50644, 52.47528], [13.50646, 52.47986], [13.5065, 52.47458], [13.50652, 52.47916], [13.50655, 52.47388], [13.50657, 52.47846], [13.5066, 52.47318], [13.50662, 52.47776], [13.50673, 52.47635], [13.50678, 52.47565], [13.5068, 52.48023], [13.50683, 52.47495], [13.50685, 52.47953], [13.50688, 52.47425], [13.5069, 52.47883], [13.50694, 52.47355], [13.50696, 52.47813], [13.50701, 52.47743], [13.50706, 52.47673], [13.50711, 52.47602], [13.50713, 52.48061], [13.50717, 52.47532], [13.50719, 52.47991], [13.50722, 52.47462], [13.50724, 52.4792], [13.50727, 52.47392], [13.50729, 52.4785], [13.50734, 52.4778], [13.5074, 52.4771], [13.50745, 52.4764], [13.5075, 52.4757], [13.50752, 52.48028], [13.50755, 52.47499], [13.50757, 52.47958], [13.50761, 52.47429], [13.50763, 52.47887], [13.50766, 52.47359], [13.50768, 52.47817], [13.50773, 52.47747], [13.50778, 52.47677], [13.50784, 52.47607], [13.50786, 52.48065], [13.50789, 52.47537], [13.50791, 52.47995], [13.50794, 52.47467], [13.50796, 52.47925], [13.50799, 52.47396], [13.50801, 52.47855], [13.50807, 52.47784], [13.50812, 52.47714], [13.50817, 52.47644], [13.50822, 52.47574], [13.50824, 52.48032], [13.50828, 52.47504], [13.5083, 52.47962], [13.50833, 52.47434], [13.50835, 52.47892], [13.5084, 52.47822], [13.50845, 52.47751], [13.50851, 52.47681], [13.50856, 52.47611], [13.50858, 52.48069], [13.50861, 52.47541], [13.50863, 52.47999], [13.50866, 52.47471], [13.50868, 52.47929], [13.50874, 52.47859], [13.50879, 52.47789], [13.50884, 52.47719], [13.50889, 52.47648], [13.50894, 52.47578], [13.50897, 52.48036], [13.509, 52.47508], [13.50902, 52.47966], [13.50905, 52.47438], [13.50907, 52.47896], [13.50912, 52.47826], [13.50918, 52.47756], [13.50923, 52.47686], [13.50928, 52.47616], [13.50938, 52.47475], [13.50946, 52.47863], [13.50951, 52.47793], [13.50956, 52.47723], [13.50961, 52.47653], [13.50984, 52.4783], [13.5099, 52.4776], [13.50995, 52.4769], [13.51, 52.4762], [13.51018, 52.47868], [13.51023, 52.47797], [13.51028, 52.47727], [13.51034, 52.47657], [13.51057, 52.47835], [13.51062, 52.47764], [13.51067, 52.47694], [13.5109, 52.47872], [13.51095, 52.47802], [13.51101, 52.47732], [13.51129, 52.47839], [13.51134, 52.47769], [13.51139, 52.47699]]

This result of geojson2h3 is wrong. When I compare the MultiPolygon geojson2h3 created to the actual location of the points I created the hashes from, I can visually confirm that the resulting MulitPolygon from geojson2h3 should look different:

Screenshot 2023-10-19 at 15 26 33 Screenshot 2023-10-19 at 15 27 26

For convinience: This is the MulitPoint file. I visualized everything on geojson.io.

{"type":"Feature","properties":{},"geometry":{"type":"MultiPoint","coordinates":[[13.50371,52.473],[13.50389,52.47548],[13.50391,52.48006],[13.50394,52.47478],[13.504,52.47408],[13.50405,52.47337],[13.50425,52.48043],[13.50428,52.47515],[13.5043,52.47973],[13.50433,52.47445],[13.50435,52.47903],[13.50438,52.47375],[13.50444,52.47305],[13.50461,52.47552],[13.50463,52.4801],[13.50467,52.47482],[13.50469,52.4794],[13.50472,52.47412],[13.50474,52.4787],[13.50477,52.47342],[13.50497,52.48048],[13.505,52.47519],[13.50502,52.47978],[13.50505,52.47449],[13.50507,52.47907],[13.50511,52.47379],[13.50516,52.47309],[13.50534,52.47557],[13.50536,52.48015],[13.50539,52.47486],[13.50541,52.47945],[13.50544,52.47416],[13.50546,52.47874],[13.50549,52.47346],[13.50567,52.47594],[13.50569,52.48052],[13.50572,52.47524],[13.50574,52.47982],[13.50577,52.47454],[13.5058,52.47912],[13.50583,52.47383],[13.50588,52.47313],[13.506,52.47631],[13.50606,52.47561],[13.50608,52.48019],[13.50611,52.47491],[13.50613,52.47949],[13.50616,52.47421],[13.50618,52.47879],[13.50621,52.4735],[13.50623,52.47809],[13.50639,52.47598],[13.50641,52.48056],[13.50644,52.47528],[13.50646,52.47986],[13.5065,52.47458],[13.50652,52.47916],[13.50655,52.47388],[13.50657,52.47846],[13.5066,52.47318],[13.50662,52.47776],[13.50673,52.47635],[13.50678,52.47565],[13.5068,52.48023],[13.50683,52.47495],[13.50685,52.47953],[13.50688,52.47425],[13.5069,52.47883],[13.50694,52.47355],[13.50696,52.47813],[13.50701,52.47743],[13.50706,52.47673],[13.50711,52.47602],[13.50713,52.48061],[13.50717,52.47532],[13.50719,52.47991],[13.50722,52.47462],[13.50724,52.4792],[13.50727,52.47392],[13.50729,52.4785],[13.50734,52.4778],[13.5074,52.4771],[13.50745,52.4764],[13.5075,52.4757],[13.50752,52.48028],[13.50755,52.47499],[13.50757,52.47958],[13.50761,52.47429],[13.50763,52.47887],[13.50766,52.47359],[13.50768,52.47817],[13.50773,52.47747],[13.50778,52.47677],[13.50784,52.47607],[13.50786,52.48065],[13.50789,52.47537],[13.50791,52.47995],[13.50794,52.47467],[13.50796,52.47925],[13.50799,52.47396],[13.50801,52.47855],[13.50807,52.47784],[13.50812,52.47714],[13.50817,52.47644],[13.50822,52.47574],[13.50824,52.48032],[13.50828,52.47504],[13.5083,52.47962],[13.50833,52.47434],[13.50835,52.47892],[13.5084,52.47822],[13.50845,52.47751],[13.50851,52.47681],[13.50856,52.47611],[13.50858,52.48069],[13.50861,52.47541],[13.50863,52.47999],[13.50866,52.47471],[13.50868,52.47929],[13.50874,52.47859],[13.50879,52.47789],[13.50884,52.47719],[13.50889,52.47648],[13.50894,52.47578],[13.50897,52.48036],[13.509,52.47508],[13.50902,52.47966],[13.50905,52.47438],[13.50907,52.47896],[13.50912,52.47826],[13.50918,52.47756],[13.50923,52.47686],[13.50928,52.47616],[13.50938,52.47475],[13.50946,52.47863],[13.50951,52.47793],[13.50956,52.47723],[13.50961,52.47653],[13.50984,52.4783],[13.5099,52.4776],[13.50995,52.4769],[13.51,52.4762],[13.51018,52.47868],[13.51023,52.47797],[13.51028,52.47727],[13.51034,52.47657],[13.51057,52.47835],[13.51062,52.47764],[13.51067,52.47694],[13.5109,52.47872],[13.51095,52.47802],[13.51101,52.47732],[13.51129,52.47839],[13.51134,52.47769],[13.51139,52.47699]]}}

I am using

geojson2h3: 1.2.0,
h3-js: 4.1.0,

h3SetToFeature returns Polygon without hole in it

I think something is wrong with the h3SetToFeature function.

This is my h3 set

["8b283472a931fff", "8b283472a930fff", "8b283472a932fff", "8b283472e64dfff", "8b283472e648fff", "8b283472e64efff", "8b283472e65dfff", "8b283472e65cfff", "8b283472e65efff", "8b283472e653fff", "8b283472e6edfff", "8b283472e6e9fff", "8b283472a9b6fff", "8b283472a9b2fff", "8b283472a994fff", "8b283472a995fff", "8b283472a990fff", "8b283472a991fff", "8b283472a99efff", "8b283472ad6dfff", "8b283472a99afff", "8b283472a933fff", "8b283472e652fff", "8b283472e6e1fff", "8b283472e6e0fff", "8b283472e6e6fff", "8b283472e6f5fff", "8b283472e61bfff", "8b283472e6f4fff", "8b283472e61afff", "8b283472e6adfff", "8b283472e61efff", "8b283472e733fff", "8b283472e706fff", "8b283472e700fff", "8b283472e705fff", "8b283472e72afff", "8b283472e728fff", "8b283472e729fff", "8b283472e0dafff", "8b283472e0dbfff", "8b283472e0d9fff", "8b283472e764fff", "8b283472e765fff", "8b283472e760fff", "8b283472e761fff", "8b283472e763fff", "8b283472e76efff", "8b283472e745fff", "8b283472e768fff", "8b283472e76bfff", "8b283472e2b6fff", "8b283472e2b0fff", "8b283472e2b3fff", "8b283472e295fff", "8b283472e291fff", "8b283472e29efff", "8b283472e29afff", "8b283472a934fff", "8b283472a936fff", "8b283472e613fff", "8b283472e611fff", "8b283472e615fff", "8b283472e633fff", "8b283472e630fff", "8b283472e634fff", "8b283472e71afff", "8b283472e71efff", "8b283472e711fff", "8b283472e715fff"]

And this is the resulting Polygon

{"type":"Feature","properties":{},"geometry":{"type":"Polygon","coordinates":[[[-122.02494708183322,37.33035538285421],[-122.02527958119997,37.33033139985116],[-122.02545839797092,37.3305481965884],[-122.02579089675831,37.33052421202575],[-122.02594457738253,37.3302834311919],[-122.02627707419833,37.33025944553571],[-122.02645589178213,37.33047624024733],[-122.02678838801853,37.33045225303155],[-122.0269672064106,37.33066904619919],[-122.0272997020675,37.330645057423844],[-122.02745337794009,37.330404275946954],[-122.02778587162524,37.33038028607813],[-122.02793954552169,37.33013950398937],[-122.02776072712076,37.32992271178497],[-122.02742823482777,37.32994670118773],[-122.02724941723504,37.329729907439315],[-122.02740309193086,37.32948912476978],[-122.0272242751419,37.329272329959004],[-122.02737794924937,37.32903154669318],[-122.02719913326418,37.32881475082006],[-122.02735280678327,37.328573966958],[-122.02717399160187,37.32835717002252],[-122.02732766453258,37.32811638556423],[-122.02714885015497,37.32789958756648],[-122.02730252249731,37.327658802511976],[-122.02712370892344,37.32744200345193],[-122.02727738067745,37.32720121780126],[-122.0270985679073,37.326984417678965],[-122.02725223907295,37.32674363143215],[-122.02707342710657,37.32652683024761],[-122.026740943979,37.326550814828224],[-122.02656213282081,37.32633401209979],[-122.02622964911379,37.32635799512097],[-122.02605083876382,37.32614119084869],[-122.02620451211638,37.3259004040369],[-122.0260257025701,37.32568359870244],[-122.02569321967586,37.32570757969809],[-122.02551441093786,37.32549077281979],[-122.02566808508958,37.32524998542751],[-122.0254892771553,37.32503317748708],[-122.02564295071865,37.324792389498725],[-122.02546414358807,37.32457558049617],[-122.02513166289867,37.32459955900028],[-122.02495285657636,37.32438274845395],[-122.02462037530773,37.324406725398646],[-122.0244415697937,37.324189913308544],[-122.02410908794592,37.324213888693855],[-122.02395541022007,37.3244546766353],[-122.02362292640105,37.324478650927226],[-122.02344412169997,37.32426183681167],[-122.02311163730184,37.32428580954419],[-122.02295795621268,37.324526596858256],[-122.02262546984342,37.324550568497344],[-122.02244666595544,37.32433375235636],[-122.0221141790072,37.32435772243599],[-122.02196049455476,37.32459850912259],[-122.02162800563538,37.32462247810875],[-122.02144920256063,37.324405659942364],[-122.02111671306243,37.32442962736907],[-122.02096302524674,37.32467041342808],[-122.02063053377749,37.32469437976126],[-122.0204517315161,37.32447755956949],[-122.02011923946806,37.32450152434319],[-122.01994043801527,37.3242847026077],[-122.01960794538849,37.32430866582193],[-122.01945425282234,37.324549451237516],[-122.01963305427023,37.32476627345468],[-122.01947936111551,37.32500705827413],[-122.01965816336713,37.32522387942924],[-122.01950446962385,37.32546466365252],[-122.01968327267912,37.32568148374557],[-122.01952957834729,37.32592226737264],[-122.01970838220626,37.326139086403614],[-122.01955468728582,37.32637986943448],[-122.01973349194849,37.326596687403345],[-122.01957979643952,37.326837469837955],[-122.01975860190586,37.327054286744705],[-122.01960490580834,37.32729506858303],[-122.01978371207838,37.327511884427636],[-122.01963001539225,37.32775266566964],[-122.01980882246605,37.32796948045207],[-122.0196551251913,37.32821026109776],[-122.01983393306881,37.328427074817995],[-122.01968023520554,37.32866785486731],[-122.01934772807732,37.32869182118061],[-122.01919402823802,37.32893260061776],[-122.01937283691433,37.3291494137574],[-122.01921913648641,37.32939019259814],[-122.01939794596646,37.32960700467554],[-122.01973045587933,37.32958303743057],[-122.01990926616806,37.329799847964075],[-122.01975556653896,37.33004062622417],[-122.01993437763146,37.33025743569541],[-122.02026688835791,37.330233466424964],[-122.02044570025903,37.330450274352295],[-122.02077821040669,37.330426303522174],[-122.02093190726083,37.330185525230576],[-122.02126441543726,37.330161553306674],[-122.02144322815184,37.3303783592085],[-122.02177573574936,37.33035438572496],[-122.02195454927252,37.33057119008284],[-122.02228705629103,37.33054721503964],[-122.02244074839408,37.33030643610447],[-122.02277325344124,37.33028245996752],[-122.02295206777768,37.330499262299895],[-122.02279837706223,37.330740041250756],[-122.02297719220245,37.33095684252074],[-122.02282350089847,37.331197620875166],[-122.0230023168425,37.331414421082755],[-122.02284862494996,37.33165519884069],[-122.02302744169779,37.331871997985886],[-122.02287374921674,37.33211277514733],[-122.02305256676833,37.33232957323008],[-122.02289887369875,37.33257034979499],[-122.02307769205417,37.332787146815306],[-122.02292399839604,37.333027922783636],[-122.02310281755526,37.333244718741476],[-122.02343533037732,37.33322073824941],[-122.02361415034505,37.33343753266322],[-122.02346045748607,37.33367830805062],[-122.02312794327165,37.33370228900857],[-122.02297424843643,37.333943063783714],[-122.02315306920329,37.33415985761654],[-122.0234855848101,37.33413587619267],[-122.0236644063855,37.334352668481415],[-122.0239969214131,37.3343286854978],[-122.02415061347293,37.33408791069137],[-122.02397179189288,37.33387111888419],[-122.02412548336417,37.33363034348114],[-122.02394666258795,37.33341355061143],[-122.0241003534707,37.33317277461179],[-122.02392153349831,37.332955980679586],[-122.0240752237926,37.33271520408338],[-122.023896404624,37.33249840908867],[-122.0235638951658,37.3325223902086],[-122.02338507680568,37.33230559366985],[-122.02353876789908,37.33206481649275],[-122.02335995034281,37.33184801889156],[-122.02351364084768,37.33160724111797],[-122.02333482409517,37.33139044245435],[-122.02348851401155,37.33114966408427],[-122.02330969806285,37.33093286435825],[-122.02346338739072,37.330692085391725],[-122.02379589127968,37.33066810613555],[-122.02394957863143,37.330427326556936],[-122.02428208054893,37.330403346207106],[-122.02446089650694,37.33062014496993],[-122.02479339784522,37.33059616306049],[-122.02494708183322,37.33035538285421]],[[-122.02392445024508,37.32996974607513],[-122.0237707634818,37.33021052625016],[-122.02343826098515,37.33023450504039],[-122.02325944664399,37.33001770318962],[-122.0229269435682,37.33004168042024],[-122.02274813003552,37.32982487702556],[-122.02241562638063,37.329848852696564],[-122.02226193486612,37.33008963222818],[-122.02192942923993,37.33011360680547],[-122.02175061652055,37.32989680138525],[-122.02141811031535,37.32992077440292],[-122.02123929840454,37.32970396743878],[-122.02090679162043,37.32972793889682],[-122.02072798051819,37.329511130388795],[-122.02039547315522,37.3295351002872],[-122.0202166628616,37.32931829023528],[-122.02037035992608,37.329077510766574],[-122.0201915504362,37.32886069965242],[-122.02034524691209,37.328619919587325],[-122.02016643822597,37.328403107410914],[-122.02032013411323,37.32816232674947],[-122.02014132623084,37.32794551351086],[-122.02029502152958,37.32770473225308],[-122.02011621445088,37.32748791795227],[-122.02026990916106,37.32724713609817],[-122.02009110288608,37.327030320735204],[-122.02024479700772,37.326789538284835],[-122.02006599153644,37.326572721859726],[-122.02021968506949,37.326331938813105],[-122.02004088040191,37.32611512132588],[-122.02019457334643,37.32587433768302],[-122.02001576948257,37.32565751913369],[-122.02016946183849,37.32541673489463],[-122.01999065877831,37.32519991528325],[-122.02014435054572,37.32495913044801],[-122.02047684398597,37.3249351652084],[-122.02065564705102,37.325151984338135],[-122.02098813991248,37.325128017539036],[-122.02114182831667,37.324887232076144],[-122.02147431920706,37.324863264183506],[-122.02165312308547,37.32508008128783],[-122.02198561339702,37.32505611183572],[-122.02213929843793,37.324815325745234],[-122.02247178677835,37.32479135519963],[-122.02265059147001,37.32500817027854],[-122.02298307923144,37.32498419817347],[-122.02313676090905,37.32474341145548],[-122.02346924669928,37.32471943825696],[-122.02364805220404,37.32493625131044],[-122.02398053741521,37.3249122765525],[-122.02413421572948,37.324671489207105],[-122.02446669896938,37.32464751335576],[-122.02464550528711,37.32486432438378],[-122.02449182836031,37.32510511174482],[-122.02467063548173,37.32532192171073],[-122.02451695796654,37.3255627084757],[-122.02469576589169,37.32577951737947],[-122.02454208778809,37.32602030354834],[-122.02472089651695,37.32623711138995],[-122.025053383354,37.32621313258107],[-122.02520706007007,37.3259723463966],[-122.02553954493574,37.325948366494295],[-122.02571835447748,37.32616517231042],[-122.02556467914896,37.32640595851051],[-122.02574348949442,37.32662276326447],[-122.02607597517289,37.326598781336656],[-122.02625478632662,37.32681558454672],[-122.02658727142568,37.326791601059476],[-122.02676608338764,37.32700840272567],[-122.02661241024596,37.32724918836078],[-122.02679122301164,37.32746598896474],[-122.02663754928163,37.32770677400368],[-122.02681636285104,37.32792357354536],[-122.02666268853265,37.3281643579881],[-122.02684150290585,37.32838115646752],[-122.02668782799907,37.32862194031404],[-122.02686664317602,37.328838737731104],[-122.02671296768084,37.32907952098138],[-122.02689178366155,37.32929631733614],[-122.026738107578,37.32953709999011],[-122.02640561412602,37.32956108627378],[-122.02625193606634,37.329801868315904],[-122.02591944064275,37.32982585350607],[-122.025765760607,37.33006663493627],[-122.02543326321182,37.3300906190329],[-122.02525444724465,37.329873821233285],[-122.02492194927012,37.32989780377035],[-122.02476826587059,37.33013858457299],[-122.02443576592457,37.33016256601644],[-122.02425695077034,37.32994576619127],[-122.02392445024508,37.32996974607513]]]}}

The h3 hashes are locations that are arranged in a closed circle. The h3SetToFeature() function creates a Polygon without a hole in it, hence filling the whole space.... I would expect the function to create a Polygon with a hole in it. Is there a way to do this?

`geojson2h3.featureToH3Set` calculating indexes different from those in the docs

const polygon = {
    type: 'Feature',
    geometry: {
        type: 'Polygon',
        coordinates: [[
            [-180.00, -90.00],
            [-180.00,  90.00],
            [ 180.00,  90.00],
            [ 180.00, -90.00],
            [-180.00, -90.00]
        ]]
    }
};
  
const hexagons = geojson2h3.featureToH3Set(polygon, 0);
console.log(hexagons.length);
// output → 0, expected 122
// change coords to
coordinates: [[
            [-179.00, -89.00],
            [-179.00,  89.00],
            [ 179.00,  89.00],
            [ 179.00, -89.00],
            [-179.00, -89.00]
        ]]
// output → 1, expected 122
console.log(geojson2h3.featureToH3Set(polygon, 2).length);
// ouput → 31, expected 5882

what am I doing wrong?

Typings?

Can a typings file be generated for this project to support intellisense & TypeScript?

Example:

declare module 'geojson2h3' {
    import { Feature } from 'geojson';

    export function featureToH3Set(feature: Feature, resolution: number): string[];
    export function h3ToFeature(hexAddress: string, properties: Record<string, string | number | boolean>): Feature;
    export function h3SetToFeature(hexagons: string[], properties: Record<string, string | number | boolean>): Feature;
    export function h3SetToMultiPolygonFeature(hexagons: string[], properties: Record<string, string | number | boolean>): Feature;
    export function h3SetToFeatureCollection(hexagons: string[], getProperties: (hexAddress: string) => Record<string, string | number | boolean>): string[];
}

The example are what I assume the typings might be, maintainers will probably have a better idea for the properties args at least.

Executing Geojson2h3 on the browser without Nodejs

I am trying to execute Geojson2h3 on the client browser without Nodejs. I have imported the 'geojson2h3.js' javascript file
However, I am getting an error with the following code.
I am hoping that this is possible to execute geojson2h3 in the browser.

<script src="assets/js/geojson2h3.js"></script>
<script src="assets/js/h3binning.js"></script>		
<script src="https://unpkg.com/h3-js"></script>
<script src="https://unpkg.com/[email protected]/dist/h3-js.umd.js"></script>

function h3binning(){     
    var filename = "sample.geojson"
    var geoJSON = { "type": "FeatureCollection",
    "features": [
      { "type": "Feature",
        "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
        "properties": {"prop0": "value0"}
        }
      ]
    }

    console.log('geoJSON: geoJSON' )
    console.log('JSON.stringify(geoJSON): ' + JSON.stringify(geoJSON) )
        
    const hexagons2 = geojson2h3.featureToH3Set(geoJSON, 10); //binning level.  
}

I receive this error.

Uncaught ReferenceError: geojson2h3 is not defined
    at h3binning (h3binning.js:61:23)
    at HTMLButtonElement.<anonymous> ((index):467:22)
    at HTMLButtonElement.dispatch (jquery-3.6.0.min.js:2:43064)
    at v.handle (jquery-3.6.0.min.js:2:41048) 

New release please

Can you please submit a new release? The latest one is from before the "ensureOutput" option was added

Support Point feature type

The README mentions that the feature types must be Polygon or MultiPolygon. Could Point also be a supported feature type? This would give a single "make H3 indexes out of this GeoJSON" function.

Cannot convert arry of hashes to geojson

I have this array of hashes

const foo = ["84f065dffffffff", "84f0655ffffffff", "84f060bffffffff", "84f0609ffffffff", "84f0643ffffffff", "84f066bffffffff", "84f0651ffffffff", "84f060dffffffff", "84f0605ffffffff", "84f062bffffffff", "84f0443ffffffff", "84f0409ffffffff", "84f040bffffffff", "84f0463ffffffff", "84f040dffffffff", "84f0405ffffffff", "84f042bffffffff", "84f0407ffffffff", "84f0403ffffffff", "84f0439ffffffff", "84f043dffffffff", "84f0423ffffffff", "84f0435ffffffff", "84f05c9ffffffff", "84f05cbffffffff", "84f05c1ffffffff", "84f05c3ffffffff", "84f05c7ffffffff", "84e7609ffffffff", "84f0589ffffffff", "84f0581ffffffff", "84f0587ffffffff", "84f0585ffffffff", "84f05abffffffff", "84f05bdffffffff", "84f05b5ffffffff", "84e7253ffffffff", "84e7257ffffffff", "84e721dffffffff", "84e720bffffffff", "84e7203ffffffff", "84f05a3ffffffff", "84e7207ffffffff", "84e7205ffffffff", "84e7229ffffffff", "84e722bffffffff", "84e7221ffffffff", "84e722dffffffff", "84e7225ffffffff", "84e731bffffffff", "84e7319ffffffff", "84e735bffffffff", "84e7227ffffffff", "84e7353ffffffff", "84e7351ffffffff", "84e7357ffffffff", "84e7355ffffffff", "84e730bffffffff", "84e7301ffffffff", "84e730dffffffff", "84e7305ffffffff", "84e7329ffffffff", "84e732dffffffff", "84e62cbffffffff", "84e16cbffffffff", "84e62c1ffffffff", "84e16c3ffffffff", "84e62c7ffffffff", "84e62c3ffffffff", "84e628dffffffff", "84e6285ffffffff", "84e62a9ffffffff", "84e62a1ffffffff", "84e62adffffffff", "84e62e3ffffffff", "84e62ebffffffff", "84e62a5ffffffff", "84e601bffffffff", "84e6013ffffffff", "84e6011ffffffff"]

When I run geojson2h3.featureToH3Set(foo); I get

> Error: Unhandled type: undefined

and further this information

Error: Unhandled type: undefined
featureToH3Set@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:158458:22
_callee$@http://localhost:8081/src/screens/statistics/CountryDetail.bundle?platform=ios&modulesOnly=true&app=org.reactjs.native.example....&dev=true&minify=false&runModule=true&shallow=true:122:68
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:24036:23
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:24206:32
tryCatch@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:24036:23
invoke@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:24108:30
@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:24118:21
tryCallOne@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:28713:16
@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:28814:27
@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:29405:26
_callTimer@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:29301:17
_callReactNativeMicrotasksPass@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:29340:17
callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:29550:44
__callReactNativeMicrotasks@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:3052:46
@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:2830:45
__guard@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:3035:15
flushedQueue@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=org.reactjs.native.example....:2829:21
flushedQueue@[native code]
invokeCallbackAndReturnFlushedQueue@[native code]

featureToH3Set is not deterministic (reproducible)

node v10.16.0 (also in Chrome)
geojson2h3 v1.0.1

Using test data calls.json from https://gist.github.com/christophercliff/dffe5c23c8fa396c40b7ab774ee2de72.

calls.json has three sets of args, [a, b, c], like:

[[Feature, number], [Feature, number], [Feature, number]]

Calling c alone works:

const assert = require('assert')
const geojson2h3 = require('geojson2h3')
const [a, b, c] = require('./calls.json')

const hexArr = geojson2h3.featureToH3Set(...c)
const hexSet = new Set(hexArr)

assert(hexArr.length === 11486)
assert(hexSet.size === 11486)

Calling three times in order [a, b, c] produces incorrect output:

const assert = require('assert')
const geojson2h3 = require('geojson2h3')
const [a, b, c] = require('./calls.json')

geojson2h3.featureToH3Set(...a)
geojson2h3.featureToH3Set(...b)
const hexArr = geojson2h3.featureToH3Set(...c)
const hexSet = new Set(hexArr)

assert(hexArr.length === 11486)
assert(hexSet.size === 11486)

The order matters. Calling [a, c], [b, c], [b, a, c] appear to work.

h3SetToFeature returns misshaped MultiPolygon

I am getting a strange result when using h3SetToFeature.
This are the hashes (resolution 10) I am passing to the h3SetToFeature.

let h3Hashes = ["8a2834745127fff","8a2834745127fff","8a2834745127fff","8a283474512ffff","8a283474512ffff","8a283474512ffff","8a2834745177fff","8a2834745177fff","8a2834745177fff","8a2834745147fff","8a2834745147fff","8a2834745147fff","8a283474514ffff","8a283474514ffff","8a283474514ffff","8a2834745a97fff","8a2834745a97fff","8a2834745a97fff","8a2834745a9ffff","8a2834745a9ffff","8a2834745a9ffff","8a2834745337fff","8a2834745327fff","8a2834745327fff","8a2834745307fff","8a283474532ffff","8a283474530ffff","8a283474530ffff","8a2834745377fff","8a2834745357fff","8a2834745357fff","8a2834745357fff","8a283474535ffff","8a283474535ffff","8a283474535ffff","8a2834745267fff","8a2834745267fff","8a2834745267fff","8a283474526ffff","8a283474526ffff","8a283474526ffff","8a283476a537fff","8a283476a537fff","8a283476a537fff","8a283476a507fff","8a283476a507fff","8a283476a507fff","8a283476a50ffff","8a283476a50ffff","8a283476a577fff","8a283476a577fff","8a283476a547fff","8a283476a547fff","8a283476a547fff","8a283476a54ffff","8a283476a54ffff","8a283476a0b7fff","8a283476a0b7fff","8a283476a087fff","8a283476a087fff","8a283476a087fff","8a283476a08ffff","8a283476a08ffff","8a2834744987fff","8a28347448c7fff","8a28347448dffff","8a28347448dffff","8a28347448dffff","8a2834744167fff","8a2834744167fff","8a2834744167fff","8a2834744147fff","8a283474416ffff"];

Here is function call

const result = geojson2h3.h3SetToFeature(h3Hashes);

And the stringyfied result is this

{"type":"Feature","properties":{},"geometry":{"type":"MultiPolygon","coordinates":[[[[-122.177128570058,37.39595330141493],[-122.177333429289,37.39662671070871],[-122.17817720593614,37.39679411426042],[-122.17838207218551,37.39746751464813],[-122.17922585163717,37.39763490685678],[-122.17943072490492,37.398308298337966],[-122.18027450716059,37.39847567920331],[-122.18047938744664,37.39914906177764],[-122.18132317250576,37.399316431299454],[-122.18152805981013,37.39998980496648],[-122.1823718476721,37.40015716314454],[-122.177128570058,37.39595330141493]]],[[[-122.17922585163717,37.39763490685678],[-122.17943072490492,37.398308298337966],[-122.17922585163717,37.39763490685678]]],[[[-122.18047938744664,37.39914906177764],[-122.18047938744664,37.39914906177764]]],[[[-122.18152805981013,37.39998980496648],[-122.18088915512129,37.4004958129059],[-122.18109404250993,37.401169181459544],[-122.1819378415216,37.40133653827952],[-122.18214273592875,37.4020098979252],[-122.18298653774308,37.402177243400935],[-122.18319143916875,37.40285059413825],[-122.18403524378516,37.40301792826948],[-122.18424015222928,37.403691270098044],[-122.18508395964724,37.40385859288454],[-122.18528887510988,37.40453192580398],[-122.18613268532881,37.404699237245524],[-122.1863376078099,37.40537256125544],[-122.1871814208293,37.405539861351755],[-122.18738635032881,37.406213176451764],[-122.1882301661481,37.40638046520265],[-122.18843510266606,37.40705377139234],[-122.18927892128468,37.40722104879754],[-122.18948386482107,37.40789434607652],[-122.19032768623849,37.4080616121358],[-122.19053263679324,37.40873490050372],[-122.1913764610089,37.40890215521684],[-122.19201532351721,37.4083961229223],[-122.19285913937777,37.408563367649556],[-122.1930641038827,37.40923664331079],[-122.19390792254015,37.409403876691655],[-122.1941128940632,37.410077143440944],[-122.1949567155169,37.410244365475194],[-122.19559555429423,37.409738322121285],[-122.1964393673902,37.40990553417007],[-122.19664435286215,37.41057878821134],[-122.19748816875298,37.410745988913284],[-122.19769316124287,37.411419234041716],[-122.198536979928,37.41158642339658],[-122.19917579496925,37.41108036898498],[-122.19897079554929,37.41040712765257],[-122.1981269880181,37.41023993693571],[-122.1979219956158,37.40956668669037],[-122.1970781908786,37.409399484626654],[-122.19687320549399,37.40872622546877],[-122.19602940355135,37.40855901205846],[-122.19539057584014,37.40906505916757],[-122.19454676553963,37.40889783577216],[-122.19434179410345,37.40822456390639],[-122.1934979865989,37.40805732916462],[-122.19329302218068,37.407384048387186],[-122.19244921747267,37.407216802299274],[-122.19181036603044,37.40772283834949],[-122.19096655296723,37.40755558227609],[-122.19076160249864,37.40688228879209],[-122.18991779223337,37.40671502137279],[-122.18971284878297,37.40604171897801],[-122.18886904131618,37.405874440213026],[-122.18866410488397,37.40520112890786],[-122.18782030021623,37.40503383879744],[-122.18761537080226,37.404360518582244],[-122.18677156893408,37.40419321712663],[-122.18656664653834,37.40351988800181],[-122.18572284747032,37.403352575201254],[-122.1855179320928,37.402679237167206],[-122.18615680885031,37.40217321572855],[-122.18595189355804,37.401499872580395],[-122.1851081084411,37.40133254707616],[-122.18490320016683,37.40065919501948],[-122.18405941785082,37.400491858171016],[-122.18385451659462,37.399818497206184],[-122.18301073708012,37.39965114901371],[-122.18280584284199,37.39897777914111],[-122.18196206612947,37.398810419604885],[-122.18175717890946,37.39813704082493],[-122.18091340499953,37.39796966994516],[-122.18070852479762,37.397296282258225],[-122.17986475369081,37.39712890003518],[-122.17965988050702,37.39645550344166],[-122.1788161122039,37.39628810987554],[-122.17861124603826,37.39561470437583],[-122.17776748053932,37.39544729946691],[-122.17756262139186,37.3947738850614],[-122.17671885869773,37.39460646880989],[-122.1765140065684,37.39393304549897],[-122.17567024667959,37.39376561790513],[-122.17503132777263,37.39427161497894],[-122.17523617296689,37.39494504208376],[-122.17607994400329,37.395112468320896],[-122.17628479621592,37.39578588652039],[-122.18152805981013,37.39998980496648]]],[[[-122.18738635032881,37.406213176451764],[-122.18738635032881,37.406213176451764]]],[[[-122.18843510266606,37.40705377139234],[-122.18843510266606,37.40705377139234]]],[[[-122.18948386482107,37.40789434607652],[-122.18948386482107,37.40789434607652]]],[[[-122.17671885869773,37.39460646880989],[-122.17671885869773,37.39460646880989]]],[[[-122.17671885869773,37.39460646880989],[-122.17607994400329,37.395112468320896],[-122.17628479621592,37.39578588652039],[-122.17671885869773,37.39460646880989]]],[[[-122.1836254340001,37.40167123058925],[-122.1836254340001,37.40167123058925]]],[[[-122.18467413582546,37.40251191302192],[-122.18403524378516,37.40301792826948],[-122.18424015222928,37.403691270098044],[-122.18467413582546,37.40251191302192]]],[[[-122.19053263679324,37.40873490050372],[-122.1913764610089,37.40890215521684],[-122.19201532351721,37.4083961229223],[-122.19053263679324,37.40873490050372]]],[[[-122.17756262139186,37.3947738850614],[-122.17756262139186,37.3947738850614]]],[[[-122.17776748053932,37.39544729946691],[-122.17776748053932,37.39544729946691]]],[[[-122.17776748053932,37.39544729946691],[-122.17776748053932,37.39544729946691]]],[[[-122.17986475369081,37.39712890003518],[-122.17965988050702,37.39645550344166],[-122.1788161122039,37.39628810987554],[-122.17986475369081,37.39712890003518]]],[[[-122.17986475369081,37.39712890003518],[-122.17986475369081,37.39712890003518]]],[[[-122.18342053265911,37.40099787473794],[-122.18405941785082,37.400491858171016],[-122.18342053265911,37.40099787473794]]],[[[-122.1844692274662,37.40183856607904],[-122.1844692274662,37.40183856607904]]],[[[-122.18572284747032,37.403352575201254],[-122.1855179320928,37.402679237167206],[-122.18572284747032,37.403352575201254]]],[[[-122.1855179320928,37.402679237167206],[-122.1855179320928,37.402679237167206]]],[[[-122.18677156893408,37.40419321712663],[-122.18656664653834,37.40351988800181],[-122.18572284747032,37.403352575201254],[-122.18677156893408,37.40419321712663]]],[[[-122.18782030021623,37.40503383879744],[-122.18761537080226,37.404360518582244],[-122.18677156893408,37.40419321712663],[-122.18782030021623,37.40503383879744]]],[[[-122.18782030021623,37.40503383879744],[-122.18782030021623,37.40503383879744]]],[[[-122.18070852479762,37.397296282258225],[-122.18070852479762,37.397296282258225]]],[[[-122.18196206612947,37.398810419604885],[-122.18196206612947,37.398810419604885]]],[[[-122.18091340499953,37.39796966994516],[-122.18091340499953,37.39796966994516]]],[[[-122.18301073708012,37.39965114901371],[-122.18280584284199,37.39897777914111],[-122.18196206612947,37.398810419604885],[-122.18301073708012,37.39965114901371]]],[[[-122.18886904131618,37.405874440213026],[-122.18866410488397,37.40520112890786],[-122.18886904131618,37.405874440213026]]],[[[-122.18991779223337,37.40671502137279],[-122.18971284878297,37.40604171897801],[-122.18886904131618,37.405874440213026],[-122.18991779223337,37.40671502137279]]],[[[-122.19096655296723,37.40755558227609],[-122.19076160249864,37.40688228879209],[-122.18991779223337,37.40671502137279],[-122.19096655296723,37.40755558227609]]],[[[-122.1930641038827,37.40923664331079],[-122.1930641038827,37.40923664331079]]],[[[-122.19181036603044,37.40772283834949],[-122.19181036603044,37.40772283834949]]],[[[-122.1941128940632,37.410077143440944],[-122.1941128940632,37.410077143440944]]],[[[-122.1934979865989,37.40805732916462],[-122.1934979865989,37.40805732916462]]],[[[-122.19454676553963,37.40889783577216],[-122.19434179410345,37.40822456390639],[-122.1934979865989,37.40805732916462],[-122.19454676553963,37.40889783577216]]],[[[-122.19559555429423,37.409738322121285],[-122.19559555429423,37.409738322121285]]],[[[-122.1970781908786,37.409399484626654],[-122.1970781908786,37.409399484626654]]],[[[-122.1981269880181,37.41023993693571],[-122.1979219956158,37.40956668669037],[-122.1970781908786,37.409399484626654],[-122.1981269880181,37.41023993693571]]],[[[-122.19897079554929,37.41040712765257],[-122.19897079554929,37.41040712765257]]],[[[-122.15332239701078,37.388062915920955],[-122.1541661954517,37.388230536821816],[-122.1548052633357,37.38772460749431],[-122.15564905345059,37.3878922184067],[-122.1562881060672,37.387386282882005],[-122.15608337277192,37.3867127388844],[-122.15523959380059,37.38654512662028],[-122.15503486752502,37.38587157372252],[-122.15419109137076,37.38570395011885],[-122.15398637211489,37.385030388321326],[-122.15462542207251,37.38452445391869],[-122.15442070289552,37.38385088701296],[-122.15357694070163,37.38368325071868],[-122.1529378865421,37.384189182681475],[-122.15314259877827,37.38486275337838],[-122.15250353355472,37.385368681584204],[-122.15270824586943,37.38604224717274],[-122.15355203034899,37.38620988076446],[-122.15375674968362,37.38688343745332],[-122.15332239701078,37.388062915920955]]],[[[-122.15311767759742,37.387389364341274],[-122.15311767759742,37.387389364341274]]],[[[-122.15375674968362,37.38688343745332],[-122.15375674968362,37.38688343745332]]],[[[-122.15419109137076,37.38570395011885],[-122.15398637211489,37.385030388321326],[-122.15419109137076,37.38570395011885]]],[[[-122.15419109137076,37.38570395011885],[-122.15419109137076,37.38570395011885]]],[[[-122.14938311359745,37.38031823554603],[-122.1502268645166,37.38048591719414],[-122.15086592021505,37.379979988795526],[-122.15066122919431,37.379306381189345],[-122.14981748941645,37.37913869819074],[-122.14917842951814,37.379644624148845],[-122.14938311359745,37.38031823554603]]],[[[-122.15398637211489,37.385030388321326],[-122.15398637211489,37.385030388321326]]],[[[-122.15523959380059,37.38654512662028],[-122.15503486752502,37.38587157372252],[-122.15523959380059,37.38654512662028]]],[[[-122.18319143916875,37.40285059413825],[-122.18319143916875,37.40285059413825]]],[[[-122.177333429289,37.39662671070871],[-122.177333429289,37.39662671070871]]],[[[-122.17838207218551,37.39746751464813],[-122.17838207218551,37.39746751464813]]],[[[-122.18528887510988,37.40453192580398],[-122.18528887510988,37.40453192580398]]],[[[-122.1863376078099,37.40537256125544],[-122.1863376078099,37.40537256125544]]]]}}

Passing the result here https://geojsonlint.com/ I get the following errors

~40 of these

Line 1: a LinearRing of coordinates needs to have four or more positions

and 1 of this

Line 1: Polygons and MultiPolygons should follow the right-hand rule

This is how the result looks like (https://geojson.tools/, geojosn.io won't even display it):
Screenshot 2023-02-19 at 18 19 08

What is happening here?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.