Geometry

DatatypeDraftv1.0.0-rc.2

A shape, as a GeoJSON geometry (RFC 7946): a point, a line, an area, or several of one kind. The first and last positions of a polygon ring are the same. GeoJSON has no curves, surfaces or solids: a shape that has them keeps its original.

https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Geometry.json

Fields

  • typeRequired
    One ofPointMultiPointLineStringMultiLineStringPolygonMultiPolygon

    The kind of shape.

  • coordinatesRequired
    List ofvalues

    The positions, nested as the type needs.

  • crs
  • positioning

    How the positions of the shape were obtained and how accurate they are.

  • original

    The dataset that the shape was converted from, and what the conversion changed.

  • properties
    object with any keys

    Free-form data about the shape.

  • When type is Point.
  • When type is MultiPoint.
  • When type is LineString.
  • When type is MultiLineString.
  • When type is Polygon.
  • When type is MultiPolygon.

Position

x, y, and an optional z.

List ofnumber

Line

Two positions or more.

List ofPosition

Ring

A closed ring: four positions or more, the last the same as the first.

List ofPosition

Polygon

The outer ring, then any holes.

List ofRing

Links

Held by Records that embed this one, with their field that holds it.

Examples

An id that another example defines opens that record.

Example 3

{
  "type": "Polygon",
  "coordinates": [
    [
      [
        -113.8157,
        52.2676
      ],
      [
        -113.8143,
        52.2676
      ],
      [
        -113.8143,
        52.2684
      ],
      [
        -113.8157,
        52.2684
      ],
      [
        -113.8157,
        52.2676
      ]
    ]
  ],
  "positioning": {
    "method": "surveyed",
    "horizontalAccuracy": 0.05,
    "confidenceLevel": 95
  },
  "original": {
    "file": "file-site-plan",
    "layer": "lease_boundary",
    "feature": "17",
    "geometryType": "CurvePolygon",
    "crs": {
      "code": "EPSG:3402"
    },
    "changes": [
      {
        "type": "curves_linearized",
        "tolerance": 0.01
      },
      {
        "type": "reprojected"
      }
    ]
  }
}
Show 2 more examples

Example 1

{
  "type": "Polygon",
  "coordinates": [
    [
      [
        -114.08,
        51.04
      ],
      [
        -114.06,
        51.04
      ],
      [
        -114.06,
        51.05
      ],
      [
        -114.08,
        51.04
      ]
    ]
  ]
}

Example 2

{
  "type": "LineString",
  "coordinates": [
    [
      -114.08,
      51.04
    ],
    [
      -114.06,
      51.05
    ]
  ],
  "crs": {
    "epsgCode": 4326
  }
}

Changes and file

Changes

  1. 0.1.0 First version.

Schema file

Show the JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://opendevelopmentstandards.org/schema/1.0.0-rc.2/core/Geometry.json",
  "title": "Geometry",
  "description": "A shape, as a GeoJSON geometry (RFC 7946): a point, a line, an area, or several of one kind. The first and last positions of a polygon ring are the same. GeoJSON has no curves, surfaces or solids: a shape that has them keeps its original.",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "enum": [
        "Point",
        "MultiPoint",
        "LineString",
        "MultiLineString",
        "Polygon",
        "MultiPolygon"
      ],
      "description": "The kind of shape."
    },
    "coordinates": {
      "type": "array",
      "description": "The positions, nested as the type needs."
    },
    "crs": {
      "$ref": "Crs.json"
    },
    "positioning": {
      "$ref": "Positioning.json",
      "description": "How the positions of the shape were obtained and how accurate they are."
    },
    "original": {
      "$ref": "Original.json",
      "description": "The dataset that the shape was converted from, and what the conversion changed."
    },
    "properties": {
      "type": "object",
      "x-ods-open": true,
      "description": "Free-form data about the shape."
    }
  },
  "required": [
    "type",
    "coordinates"
  ],
  "allOf": [
    {
      "if": {
        "properties": {
          "type": {
            "const": "Point"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "$ref": "#/$defs/Position"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "MultiPoint"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/Position"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "LineString"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "$ref": "#/$defs/Line"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "MultiLineString"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/Line"
            }
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "Polygon"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "$ref": "#/$defs/Polygon"
          }
        }
      }
    },
    {
      "if": {
        "properties": {
          "type": {
            "const": "MultiPolygon"
          }
        }
      },
      "then": {
        "properties": {
          "coordinates": {
            "type": "array",
            "items": {
              "$ref": "#/$defs/Polygon"
            }
          }
        }
      }
    }
  ],
  "patternProperties": {
    "^x-": {}
  },
  "unevaluatedProperties": false,
  "$defs": {
    "Position": {
      "type": "array",
      "minItems": 2,
      "maxItems": 3,
      "items": {
        "type": "number"
      },
      "description": "x, y, and an optional z."
    },
    "Line": {
      "type": "array",
      "minItems": 2,
      "items": {
        "$ref": "#/$defs/Position"
      },
      "description": "Two positions or more."
    },
    "Ring": {
      "type": "array",
      "minItems": 4,
      "items": {
        "$ref": "#/$defs/Position"
      },
      "description": "A closed ring: four positions or more, the last the same as the first."
    },
    "Polygon": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/Ring"
      },
      "description": "The outer ring, then any holes."
    }
  },
  "examples": [
    {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -114.08,
            51.04
          ],
          [
            -114.06,
            51.04
          ],
          [
            -114.06,
            51.05
          ],
          [
            -114.08,
            51.04
          ]
        ]
      ]
    },
    {
      "type": "LineString",
      "coordinates": [
        [
          -114.08,
          51.04
        ],
        [
          -114.06,
          51.05
        ]
      ],
      "crs": {
        "epsgCode": 4326
      }
    },
    {
      "type": "Polygon",
      "coordinates": [
        [
          [
            -113.8157,
            52.2676
          ],
          [
            -113.8143,
            52.2676
          ],
          [
            -113.8143,
            52.2684
          ],
          [
            -113.8157,
            52.2684
          ],
          [
            -113.8157,
            52.2676
          ]
        ]
      ],
      "positioning": {
        "method": "surveyed",
        "horizontalAccuracy": 0.05,
        "confidenceLevel": 95
      },
      "original": {
        "file": "file-site-plan",
        "layer": "lease_boundary",
        "feature": "17",
        "geometryType": "CurvePolygon",
        "crs": {
          "code": "EPSG:3402"
        },
        "changes": [
          {
            "type": "curves_linearized",
            "tolerance": 0.01
          },
          {
            "type": "reprojected"
          }
        ]
      }
    }
  ],
  "x-ods-status": "draft",
  "x-ods-kind": "datatype",
  "x-ods-module": "core",
  "x-ods-changes": {
    "0.1.0": "First version."
  }
}