GithubHelp home page GithubHelp logo

isabella232 / geojson-coordinate-properties Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mapbox/geojson-coordinate-properties

0.0 0.0 0.0 152 KB

a draft extension to GeoJSON defining the encoding of arbitrary properties along LineString geometries

geojson-coordinate-properties's Introduction

geojson-coordinateProperties

A GeoJSON extension proposal that adds an encoding for time & heart rate data along a LineString geometry.

Requirements Language

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119].

Definitions

JavaScript Object Notation (JSON), and the terms object, name, value, array, number, true, false, and null are to be interpreted as defined in [RFC7159].

Inside this document the term "geometry type" refers to the seven case-sensitive strings: "Point", "MultiPoint", "LineString", "MultiLineString", "Polygon", "MultiPolygon", and "GeometryCollection".

As another shorthand notation, the term "GeoJSON types" refers to the nine case-sensitive strings "Feature", "FeatureCollection" and the geometry types listed above.

Example

A GeoJSON feature collection with coordinateProperties:

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "LineString",
            "coordinates": [
                [102.0, 0.0],
                [103.0, 1.0],
                [104.0, 0.0],
                [105.0, 1.0]
            ]
        },
        "properties": {
            "prop0": "value0",
            "prop1": 0.0,
            "coordinateProperties": {
                "times": [
                    1434126869275,
                    1434136869275,
                    1434146869275,
                    1434166869275
                ]
            }
        }
    }]
}

MultiLineString Geometry with higher level of nesting

{
    "type": "FeatureCollection",
    "features": [{
        "type": "Feature",
        "geometry": {
            "type": "MultiLineString",
            "coordinates": [
                [
                    [102.0, 0.0],
                    [103.0, 1.0]
                ],
                [
                    [104.0, 0.0],
                    [105.0, 1.0]
                ]
            ]
        },
        "properties": {
            "prop0": "value0",
            "prop1": 0.0,
            "coordinateProperties": {
                "times": [
                    [
                        1434126869275,
                        1434136869275,
                    ],
                    [
                        1434146869275,
                        1434166869275
                    ]
                ]
            }
        }
    }]
}

coordinateProperties

coordinateProperties is a special property that MAY be included in the properties member of a Feature object.

coordinateProperties MAY contain one or more members, which each MUST have a value of type Array. Each Array value MUST have have the same length as the coordinates member of the LineString geometry of that Feature. The nesting level of the array MUST match the nesting level of the geometry, such that each LinearRing of the geometry yields an array in the coordinateProperties, and each position in the geometry yields one concrete value.

Members of the coordinateProperties property can have any name, but semantics of two names are defined:

times

A times member of the coordinateProperties MUST contain values that are either

  • A Number corresponding to a Unix timestamp in milliseconds since 1 January 1970 00:00:00 UTC.
  • An internet date/time string as in RFC 3339.
  • null, indicating no data for this coordinate

heart

A heart member of the coordinateProperties MUST contain values that are either

  • A Number indicating heart-beats per minute
  • null, indicating no data for this coordinate

see also

geojson-coordinate-properties's People

Contributors

sgillies avatar tmcw 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.