Skip to content

tree id creation based of geohash, source id, and unique tree name such as common and scientific

License

Notifications You must be signed in to change notification settings

waterthetrees/tree-id

Repository files navigation

tree-id

Generate a unique tree id based on properties of the tree (e.g. sourceId or city, species or scientific name, lat/lng coordinates).

Usage:

Install this library as a dependency in your project:

npm install --save @waterthetrees/tree-id

Import and use the module:

import { createIdForTree } from '@waterthetrees/tree-id';

const treeId = createIdForTree({
  species: 'Lagerstromia Indica',
  city: 'san_francisco',
  lat: 37.713225870641935,
  lng: -122.45009922742373,
});

console.log(treeId);
import { createIdForTree } from '@waterthetrees/tree-id';

const treeId = createIdForTree({
  scientific: 'Lagerstromia Indica',
  sourceId: 'san_francisco',
  lat: 37.713225870641935,
  lng: -122.45009922742373,
});

console.log(treeId);

About

tree id creation based of geohash, source id, and unique tree name such as common and scientific

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published