4.2.1 • Published 2 years ago

geohash-to-geojson v4.2.1

Weekly downloads
262
License
MIT
Repository
github
Last release
2 years ago

geohash-to-geojson

Installation

Using npm

npm i geohash-to-geojson

Using Yarn

yarn add geohash-to-geojson

Then import the desired functions in your code

import {geohashToPolygonFeature} from 'geohash-to-geojson';

geohashToPolygonFeature('ezjmgz');

...

geohash-to-geojson

Table of contents

Type aliases

Functions

Type aliases

CircleOptions

Ƭ CircleOptions: Object

Type declaration

NameType
ruler?CheapRuler
steps?number

Defined in

index.ts:54

Functions

geohashToCircleFeature

geohashToCircleFeature(geohash, percentage, properties?, options?): Feature<Polygon>

Converts geohash to a circle Feature, based on % of the size desired

export

Parameters

NameTypeDescription
geohashstringGeohash to convert to circle
percentagenumberPercentage of the geohash area to cover with the circle
propertiesGeoJsonProperties-
options?CircleOptions-

Returns

Feature<Polygon>

The geohash as a circle Polygon Feature

Defined in

index.ts:71


geohashToCircleGeometry

geohashToCircleGeometry(geohash, percentage, options?): Polygon

Converts geohash to a circle Polygon Geometry, based on % of the size desired

export

Parameters

NameTypeDescription
geohashstringGeohash to convert to circle
percentagenumberPercentage of the geohash area to cover with the circle
options?CircleOptions-

Returns

Polygon

The geohash as a circle Polygon Geometry

Defined in

index.ts:103


geohashToPointFeature

geohashToPointFeature(geohash, properties?): Feature<Point>

Converts geohash to point feature, for centroid coordinates

export

Parameters

NameTypeDescription
geohashstringGeohash to convert to Point Feature
propertiesGeoJsonProperties-

Returns

Feature<Point>

The geohash centroid as a Point Feature

Defined in

index.ts:45


geohashToPolygonFeature

geohashToPolygonFeature(geohash, properties?): Feature<Polygon>

Converts geohash to polygon Feature

export

Parameters

NameTypeDescription
geohashstringGeohash to convert to Polygon Feature
propertiesGeoJsonProperties-

Returns

Feature<Polygon>

Defined in

index.ts:15


geohashToPolygonGeometry

geohashToPolygonGeometry(geohash): Polygon

Converts geohash to polygon Geometry

export

Parameters

NameTypeDescription
geohashstringGeohash to get as Polygon Geometry

Returns

Polygon

The Polygon Geometry representing the geohash

Defined in

index.ts:33


geohashesToFeatureCollection

geohashesToFeatureCollection(hashes): FeatureCollection

Converts array of geohashes to GeoJSON FeatureCollection

export

Parameters

NameTypeDescription
hashesstring[]Geohashes to wrap into FeatureCollection

Returns

FeatureCollection

FeatureCollection with each geohash as a Polygon Feature inside

Defined in

index.ts:125


wrapAsFeatureCollection

wrapAsFeatureCollection(featuresArray): FeatureCollection

Helper function to wrap geohash features converted using geohashToPolygonFeature in a FeatureCollection

export

Parameters

NameTypeDescription
featuresArrayFeature<Geometry, GeoJsonProperties>[]Features array to wrap inside the FeatureCollection

Returns

FeatureCollection

FeatureCollection wrapping the Features

Defined in

index.ts:114

4.2.1

2 years ago

4.2.0

2 years ago

4.1.0

3 years ago

4.0.2

3 years ago

4.0.1

3 years ago

4.0.0

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.1.0

3 years ago

2.0.2

3 years ago

2.0.1

4 years ago

2.0.0

4 years ago

1.2.0

4 years ago

1.1.0

4 years ago

1.0.0

4 years ago