{
"$type": "com.atproto.lexicon.schema",
"defs": {
"bbox2d": {
"properties": {
"bbox": {
"items": {
"ref": "#float64",
"type": "ref"
},
"maxLength": 4,
"minLength": 4,
"type": "array"
}
},
"required": [
"bbox"
],
"type": "object"
},
"bbox3d": {
"properties": {
"bbox": {
"items": {
"ref": "#float64",
"type": "ref"
},
"maxLength": 6,
"minLength": 6,
"type": "array"
}
},
"required": [
"bbox"
],
"type": "object"
},
"coordref": {
"default": "EPSG:4326",
"description": "An EPSG:.. coordref system reference",
"maxLength": 16,
"type": "string"
},
"float64": {
"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",
"type": "integer"
},
"float64exp": {
"default": 0,
"description": "Base 10 exponent for float",
"type": "integer"
},
"lineString": {
"description": "JsonFG LineString",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"items": {
"ref": "#position",
"type": "ref"
},
"type": "array"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"multiLineString": {
"description": "JsonFG MultiLineString",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"items": {
"items": {
"ref": "#position",
"type": "ref"
},
"minLength": 2,
"type": "array"
},
"type": "array"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"multiPoint": {
"description": "JsonFG MultiPoint",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"items": {
"ref": "#position",
"type": "ref"
},
"type": "array"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"multiPolygon": {
"description": "JsonFG MultiPolygon",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"items": {
"items": {
"items": {
"ref": "#position",
"type": "ref"
},
"minLength": 4,
"type": "array"
},
"type": "array"
},
"type": "array"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"point": {
"description": "JsonFG Point",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"ref": "#position",
"type": "ref"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"polygon": {
"description": "JsonFG Polygon",
"properties": {
"bbox": {
"refs": [
"#bbox2d",
"#bbox3d"
],
"type": "union"
},
"coordRefSys": {
"ref": "#coordref",
"type": "ref"
},
"coordinateExponent": {
"ref": "#float64exp",
"type": "ref"
},
"coordinates": {
"items": {
"items": {
"ref": "#position",
"type": "ref"
},
"minLength": 4,
"type": "array"
},
"type": "array"
}
},
"required": [
"coordinates"
],
"type": "object"
},
"position": {
"items": {
"ref": "#float64",
"type": "ref"
},
"maxLength": 3,
"minLength": 2,
"type": "array"
},
"position3d": {
"items": {
"ref": "#float64",
"type": "ref"
},
"maxLength": 3,
"minLength": 3,
"type": "array"
}
},
"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",
"id": "org.custorium.temp.jsonfg.geometry",
"lexicon": 1
}