npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@murithigeo/edr-client

v0.0.1

Published

A way to connect to an OGC EDR API

Downloads

63

Readme

@murithigeo/edr-client

This library provides a convinient way to make requests to EDR Servers

Status

This library has not reached 1.0 and is under active development. If you have a question or request, please create an issue.

API

Creating a new Client

let cli = await new EdrClient().create(
  "https://ogc-edr-api.murithigeo.deno.net/",
);

Load the conformance classes implemented by server

// The Client will auto prefer HTTP POST support if it finds the class http://www.opengis.net/spec/ogcapi-edr-1/1.1/conf/queries in the list
let confClasses = await cli.conformance();

Load the OpenAPI document powering the server

let openapi = await cli["service-desc"]();

let Loading all collections

let collections = await cli.collections();

Find the collection you want

let collection = collections.find((e) => e.id === "mountains");

Loading a specific collection without link object trasversal

let collection = await new CollectionQuery().create(
  "https://ogc-edr-api.murithigeo.deno.net/collections/mountains",
);
// An instance can also be loaded the same way
let instance = await new CollectionQuery().create(
  "https://ogc-edr-api.murithigeo.deno.net/collections/mountains/",
);

Load all items using certain criteria

let query = collection
  .items()
  .where(...args)
  .execute();

Query specific itemId

let item = query
  .queryItem("Mt Kenya")
  .where(...args)
  .execute();

Load all locations (This expects the endpoint /locations to return a GeoJSON FeatureCollection)

let locations = collection
  .locations()
  .where(...args)
  .execute();

Query specific locations

let res = await locations
  .queryLocations()
  ?.where(...args)
  .execute();

Query trajectory

let res = await collection
  ?.trajectory()
  .where("coords", "LINESTRING(30 2, 40 3)")
  .where(...args)
  .execute();

Making Requests Most query types have a method execute which returns an HTTP Response object. It does not parse the response

Exceptions are the /locations and /items endpoint which parse the response due to certain expectations

Where Method

The where method can be chained with each successive value overwriting a previously set value if any

query.where("bbox", [20, 1, 3, 4]).where("datetime", "eq", "2021");

HTTP Method

As mentioned in the conformance section, POST requests will be preferred via checking for the presence of a confClass. However, this can be overriden via calling

query.where("method", "POST");
// or
query.where("method", "GET");

Parameters

For each data_query, you can restrict the spatiotemporal bounds of the response using the method where

Datetime

Return data whose temporal field value lies between two dates

query.where("datetime", "between", [
  "2000-01-01T00:00:00Z",
  "2026-03-24T23:59:99Z",
]);

Return data whose temporal value is later than the input

query.where("datetime", "gte", "2000-01-01T00:00:000Z");

Return data whose temporal is earlier than the input

query.where("datetime", "lte", "2026-03-23T00:00:00Z");

These two methods are equivalent

query
  .where("datetime", "gte", "2001-01-01")
  .where("datetime", "lte", "2026-03-24");

// Is the same as
query.where("datetime", "between", ["2001-01-01", "2026-03-24"]);

Return data whose temporal value is equivalent to input

query.where("datetime", "eq", "2000-01-01");

Z (Elevation)

Return data whose elevation field lies between a range

query.where("z", "between", [0, 100]);

Return data whose elevation is in a list of heights

query.where("z", "in", [-10, -20]);

Filter data using a arithmetic sequence

// The starting point
let min = 10,
  // Number of intervals
  num = 3,
  //Size between intervals
  step = 10;
query.where("z", "interval", {
  min,
  num,
  step,
});

Get data for single value

query.where("z", "=", 1000);

Note: Each successive call of the where("z",...args) will overwrite the z param value

Parameter-name

The standard specifies that if no parameter-name value is defined, then data incorporating all parameters is returned. Therefore, you can skip invoking query.where("parameter-name",...args) if you want all of them

Request specific parameters

query.where("parameter-name", "in", ["temperature", "cloudBase"]);

Request all parameters except those specified

query.where("parameter-name", "not in", ["depth", "pressure"]);

f

query.where("f", "GeoJSON");

Bbox

For query_type's supporting bbox

// Use a Bounding Box
query.where("bbox",[33, -4, 41, 5])

// Use a GeoJSON Feature, FeatureCollection, Geometry
// Internally calls @turf/bbox to get the Bounding Box
query.where("bbox",{type:"Point",coordinates:[...]})

Coords

query_type: corridor,trajectory,position,radius, area

There are two ways to go about it

// Use a Well Known Text Representation of Geometry
// string converted to Geometry via betterknown
query.where("coords", "POINT(36 1)");

// Use a GeoJSON Geometry Object
query.where("coords", { type: "Point", coordinates: [36, 1] });

Each query type has specific allowed GeoJSON Geometry Types and which improve intellisense

// Position
query.where("coords", "POINT(...)"); // Correct
query.where("coords", "LINESTRING(...)"); // Throws Error

Resolution-[x|y|z]

For the area query type, you can also specify sampling intervals via the resolution-[x|y]

query.where("resolution-x", 10).where("resolution-y", 20);

The corridor query type additionally allows the z-axis sampling

query.where("resolution-z", 20);

Corridor Specific Parameters

Corridor-Height and Height-Units

query.where("corridor-height", 20000, "feet");

corridor-width and width-units

query.where("corridor-width", 1000, "meters");

Radius Specific Params

within and within-units

query.where("within", 1000, "meters");