4.1.2 • Published 7 months ago

@p-j/geocodejson-types v4.1.2

Weekly downloads
1
License
MIT
Repository
github
Last release
7 months ago

GeocodeJSON

GeocodeJSON packages are a collection of small utility to work with geocoding API such as Google Geocoding API, HERE Geocoding API, Opencage, etc... As well as self hosted solution like Mimirsbrunn.

These packages provide a simple inteface for geocoding addresses exposing the underlying APIs filtering capabilities while returning all response in a standard format: GeocodeJSON, a GeoJSON extension.

These packages leverage cross-fetch to work on both backend & frontend

lerna lerna codecov Build Status FOSSA Status

GeocodeJSON packages

PackageDescriptionVersionChangelog
@p-j/geocodejson-googleapisGeocode & format to GeocodeJSON using Google Geocoding APIversionchangelog
@p-j/geocodejson-hereComing soon
@p-j/geocodejson-opencageComing soon
@p-j/geocodejson-mimirsbrunnComing soon
@p-j/geocodejson-typesType definitions for GeocodeJSON packagesversionchangelog

Usage

Each provider package export 2 main functions:

  • geocode: call the API with your input and options and get the raw response from the API
  • parse: parse the rew response from the API and returned a properly formatted GeocodeJSON response equivalent

Refer to each packages README for a list of options linked to the underlying API capabilities.

Roadmap

aka: TODO

  • Implement more providers (Here, Opencage & Mimirsbrunn are top priorities)
  • Define a unified format for options for all suppoerted providers (eg: filtering, biasing, language etc...)
  • Add reverse geocoding
  • Add autocomplete
  • Add feature details endpoint (aka: place details)

Inpiration

This package was inspired by the geocodejson-spec, geocoder-geojson, geo-coder and node-geocoder

Why another geocoder then?

The list or prerequisite for this project was as follow:

  • Work as closely as possible with standard format (GeoJSON / GeocodeJSON) for interoperability and compatibility with other tools
  • Make it extensible, avoid packaging everything in one big package
  • Make it composable, expose raw output from geocoding API to allow manipulation, data extraction or caching
  • Make it fully typed to help with coding & documentation
  • Make it isomorphic: usable in the browser, on the server or in environment like Cloudflare Workers

None of the projects I've found allowed for all those options, and none had an easy way of being built upon to propose the same added value, so here we are.

License

FOSSA Status

4.1.2

7 months ago

4.1.1

1 year ago

4.1.0

2 years ago

4.0.1

2 years ago

4.0.0

2 years ago

3.0.1

2 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.0

3 years ago