Astral
  • Welcome
  • Astral Litepaper
  • GeoNFT
    • Ecological State
  • Spatial Data Registry
    • On-chain Spatial Data Registry
    • Celo/EVM Anchored Spatial Data Registry
      • Technical Design
        • Ingestion
        • Anchoring
        • Validation
        • List on Ocean Marketplace
      • Summary
    • CosmWasm Anchored Spatial Data Registry
  • Progress
  • ARCHIVE
    • Introduction
    • Spatial Data Primer
    • Background
      • Motivation
      • Value
      • The Stack
        • Data
        • Oracles
        • Spatial Contracts
    • A Web3-Native Geospatial Vision
      • A rationale for GeoDIDs
      • GeoTIFFs and IPLD
        • Encoding the GeoTIFF
        • Decoding the GeoTIFF
    • Spatial.sol
      • Design Considerations
    • Verifiable Spatial Data Registries
    • GeoDIDs
      • DID Primer
      • GeoDID Core
        • GeoDID Core Specification
        • GeoDID Collection Example
        • GeoDID Item Example
      • GeoDID Extensions
        • GeoJSON
        • GeoTIFF
          • IPLD-encoded GeoTIFF
          • Cloud-optimized GeoTIFF
        • STAC
          • STAC Items
          • STAC Catalogs
      • Build with GeoDIDs
        • Getting Started
        • @astralprotocol/core
          • API
          • Types
        • @astralprotocol/contracts
          • API
        • @astralprotocol/subgraph
      • GeoDIDs v0.2
    • Spatial Oracles
    • Universal Location Proofs
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Spatial Data Registry
  2. Celo/EVM Anchored Spatial Data Registry
  3. Technical Design

List on Ocean Marketplace

PreviousValidationNextSummary

Last updated 2 years ago

Was this helpful?

The sample queries take a polygon, date range, and provider id and return the average temperature, and the raw data points, respectively. The query endpoints are public so no access token is required to run:

# sample analytics query:
# query one month's 3 hourly data for a polygon and provider, return average temperature.
export HOST=https://<host>.com/api
curl -s \
     -w '\n' \
     -G \
     -H "Content-Type: application/json" \
     -d 'polygon={"type":"Polygon","coordinates":[[[-3.7025,40.4165],[3,60],[6,90],[-3.7025,40.4165]]]}' \
     -d 'startdate=2019-01-01' \
     -d 'enddate=2019-01-02' \
     -d 'providerId=tSuqRPkLVfDqQG3mgr0x4' \
     $HOST/596090/00833a
# raw data on which above query is based:
curl -s \
     -w '\n' \
     -G \
     -H "Content-Type: application/json" \
     -d 'polygon={"type":"Polygon","coordinates":[[[-3.7025,40.4165],[3,60],[6,90],[-3.7025,40.4165]]]}' \
     -d 'startdate=2019-01-01' \
     -d 'enddate=2019-01-02' \
     -d 'providerId=tSuqRPkLVfDqQG3mgr0x4' \
     $HOST/596090/7afb79

The data query is more appropriate for the Ocean marketplace than the previous average temperature query, which is more an example of a composable intermediate endpoint for an inference toolchain.

Data from the second query was listed on the Ocean Görli test network:

Relevant code:

on Opensea Görli Testnet

Note that you need Görli ETH and Görli OCEAN tokens to purchase.

Sample query test listing
Data NFT
Faucet for Görli OCEAN
Sample client query
Public endpoint
Listing query data on Ocean marketplace highlighted