# org.custorium.temp.jsonfg.geometry

> Published by [willem.dobs.nl](https://lexicon.garden/identity/did:plc:q3enoeuha5b2zx4p4atxtb7x)

✓ This is the authoritative definition for this NSID.

## Description

WIP, A straitforward translation from OGC Features and Geometries Json (https://docs.ogc.org/DRAFTS/21-045r1.html) to ATProto lexicon, following the draft lexicon styleguide. The most distinct change is the representation of coordinates as integers (#float64) defined as and an optional integer coordinateExponent (#float64exp) and type renamed to Lexicon $type

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:q3enoeuha5b2zx4p4atxtb7x/org.custorium.temp.jsonfg.geometry)
- [Documentation](https://lexicon.garden/lexicon/did:plc:q3enoeuha5b2zx4p4atxtb7x/org.custorium.temp.jsonfg.geometry/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:q3enoeuha5b2zx4p4atxtb7x/org.custorium.temp.jsonfg.geometry/examples)

## Definitions

### `org.custorium.temp.jsonfg.geometry#point`

**Type**: `object`

JsonFG Point

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `ref` → `#position` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

### `org.custorium.temp.jsonfg.geometry#bbox2d`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `array` | Yes |  |

### `org.custorium.temp.jsonfg.geometry#bbox3d`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `array` | Yes |  |

### `org.custorium.temp.jsonfg.geometry#float64`

**Type**: `integer`

A float64 represented as an integer should be multiplied with the closest float64exp property in a context so a float64 of 314159265 and a float64exp of -8 would give a float number of 3.14159265

```json
{
  "type": "integer",
  "description": "A float64 represented as an integer should be multiplied with the closest float64exp property in a context so a float64 of 314159265 and a float64exp of -8 would give a float number of 3.14159265"
}
```

### `org.custorium.temp.jsonfg.geometry#polygon`

**Type**: `object`

JsonFG Polygon

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `array` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

### `org.custorium.temp.jsonfg.geometry#coordref`

**Type**: `string`

An EPSG:.. coordref system reference

**Constraints**: maxLength: 16

### `org.custorium.temp.jsonfg.geometry#position`

**Type**: `array`

**Items**:

Type: `ref` → `#float64`

**Constraints**: minLength: 2, maxLength: 3

### `org.custorium.temp.jsonfg.geometry#float64exp`

**Type**: `integer`

Base 10 exponent for float

```json
{
  "type": "integer",
  "default": 0,
  "description": "Base 10 exponent for float"
}
```

### `org.custorium.temp.jsonfg.geometry#lineString`

**Type**: `object`

JsonFG LineString

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `array` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

### `org.custorium.temp.jsonfg.geometry#multiPoint`

**Type**: `object`

JsonFG MultiPoint

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `array` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

### `org.custorium.temp.jsonfg.geometry#position3d`

**Type**: `array`

**Items**:

Type: `ref` → `#float64`

**Constraints**: minLength: 3, maxLength: 3

### `org.custorium.temp.jsonfg.geometry#multiPolygon`

**Type**: `object`

JsonFG MultiPolygon

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `array` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

### `org.custorium.temp.jsonfg.geometry#multiLineString`

**Type**: `object`

JsonFG MultiLineString

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `bbox` | `union` | No |  |
| `coordRefSys` | `ref` → `#coordref` | No |  |
| `coordinates` | `array` | Yes |  |
| `coordinateExponent` | `ref` → `#float64exp` | No |  |

## Raw Schema

```json
{
  "id": "org.custorium.temp.jsonfg.geometry",
  "defs": {
    "point": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "ref": "#position",
          "type": "ref"
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG Point"
    },
    "bbox2d": {
      "type": "object",
      "required": [
        "bbox"
      ],
      "properties": {
        "bbox": {
          "type": "array",
          "items": {
            "ref": "#float64",
            "type": "ref"
          },
          "maxLength": 4,
          "minLength": 4
        }
      }
    },
    "bbox3d": {
      "type": "object",
      "required": [
        "bbox"
      ],
      "properties": {
        "bbox": {
          "type": "array",
          "items": {
            "ref": "#float64",
            "type": "ref"
          },
          "maxLength": 6,
          "minLength": 6
        }
      }
    },
    "float64": {
      "type": "integer",
      "description": "A float64 represented as an integer should be multiplied with the closest float64exp property in a context so a float64 of 314159265 and a float64exp of -8 would give a float number of 3.14159265"
    },
    "polygon": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "ref": "#position",
              "type": "ref"
            },
            "minLength": 4
          }
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG Polygon"
    },
    "coordref": {
      "type": "string",
      "default": "EPSG:4326",
      "maxLength": 16,
      "description": "An EPSG:.. coordref system reference"
    },
    "position": {
      "type": "array",
      "items": {
        "ref": "#float64",
        "type": "ref"
      },
      "maxLength": 3,
      "minLength": 2
    },
    "float64exp": {
      "type": "integer",
      "default": 0,
      "description": "Base 10 exponent for float"
    },
    "lineString": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "ref": "#position",
            "type": "ref"
          }
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG LineString"
    },
    "multiPoint": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "ref": "#position",
            "type": "ref"
          }
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG MultiPoint"
    },
    "position3d": {
      "type": "array",
      "items": {
        "ref": "#float64",
        "type": "ref"
      },
      "maxLength": 3,
      "minLength": 3
    },
    "multiPolygon": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "type": "array",
              "items": {
                "ref": "#position",
                "type": "ref"
              },
              "minLength": 4
            }
          }
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG MultiPolygon"
    },
    "multiLineString": {
      "type": "object",
      "required": [
        "coordinates"
      ],
      "properties": {
        "bbox": {
          "refs": [
            "#bbox2d",
            "#bbox3d"
          ],
          "type": "union"
        },
        "coordRefSys": {
          "ref": "#coordref",
          "type": "ref"
        },
        "coordinates": {
          "type": "array",
          "items": {
            "type": "array",
            "items": {
              "ref": "#position",
              "type": "ref"
            },
            "minLength": 2
          }
        },
        "coordinateExponent": {
          "ref": "#float64exp",
          "type": "ref"
        }
      },
      "description": "JsonFG MultiLineString"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "description": "WIP, A straitforward translation from OGC Features and Geometries Json (https://docs.ogc.org/DRAFTS/21-045r1.html) to ATProto lexicon, following the draft lexicon styleguide. The most distinct change is the representation of coordinates as integers (#float64) defined as and an optional integer coordinateExponent (#float64exp) and type renamed to Lexicon $type"
}
```
