Git Product home page Git Product logo

geohash-to-geojson's Introduction

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

Name Type
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

Name Type Description
geohash string Geohash to convert to circle
percentage number Percentage of the geohash area to cover with the circle
properties GeoJsonProperties -
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

Name Type Description
geohash string Geohash to convert to circle
percentage number Percentage 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

Name Type Description
geohash string Geohash to convert to Point Feature
properties GeoJsonProperties -

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

Name Type Description
geohash string Geohash to convert to Polygon Feature
properties GeoJsonProperties -

Returns

Feature<Polygon>

Defined in

index.ts:15


geohashToPolygonGeometry

geohashToPolygonGeometry(geohash): Polygon

Converts geohash to polygon Geometry

export

Parameters

Name Type Description
geohash string Geohash 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

Name Type Description
hashes string[] 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

Name Type Description
featuresArray Feature<Geometry, GeoJsonProperties>[] Features array to wrap inside the FeatureCollection

Returns

FeatureCollection

FeatureCollection wrapping the Features

Defined in

index.ts:114

geohash-to-geojson's People

Contributors

alrico88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

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.