Composition schema

Premysl Vohnout edited this page Apr 13, 2016 · 1 revision

This is basic definition of composition json object.

{
    "title": "Composition",
    "type": "object",
    "properties": {
        "id": {
            "description": "Generated UUID", 
            "type": "string"
        },
        "data": {
            "type": "object",
            "properties": {
                "abstract": {
                    "description": "Descriptive text about composition",
                    "type": "string"
                },
                "title": {
                    "type": "string"
                },
                "extent": {
                    "type": "array",
                    "values": [
                        "number",
                        "number",
                        "number",
                        "number"
                    ]
                },
                "user": {
                    "type": "object",
                    "properties": {
                        "email": "string",
                        "name": "string",
                        ...
                    }
                },
                "groups": {
                    "type": "object/key-value",
                    "description": "List of permissions for every group. Allowed are r,w,x"
                    "properties": {
                        "name": "permission"
                    }
                },
                "projection": {
                    "type": "string",
                    "description": "EPSG code of projection. In format EPSG:3857"
                },
                "center": {
                    "type": "array",
                    "values": ["number", "number"]
                },
                "units": {
                    "type": "string",
                    "description": "Units in which is composition. Meters or degrees."
                },
                "layers": {
                    "type": "array",
                    "values": ["object", ..., "object"],
                    "layer": {
                        "type": "object",
                        "properties": {
                            "metadata": {
                                "type": "object",
                                "properties": {}
                            },
                            "visibility": "boolean",
                            "opacity": "number",
                            "title": "string",
                            "className": {
                                "type": "string",
                                "description": "If vector or wms or something else. In format like it is defined for ol3"
                            },
                            "protocol": {
                                "type": "object",
                                "properties": {
                                    "url": "string",
                                    "format": "string"
                                }
                            },
                            "minResolution": "number",
                            "maxResolution": "number",
                            "projection": "string",
                            "style": {
                                "type": "object",
                                "format": "ol.style"
                            }
                        }
                    }
                }
            }
        }
    }
}

Example

abstract: "Orthophotomap of Liberec region",
title: "Orthophotomap of Liberec region",
extent: [
    "14.51",
    "50.54",
    "15.55",
    "50.95"
],
user: {
    email: "zmicjer@gmail.com",
    name: "Zmicier Kožuch"
},
groups: {
    guest: "r"
},
scale: 1,
projection: "epsg:3857",
center: [
    1673131.9466229,
    6576331.2407738
],
units: "m",
layers: [
    {
        metadata: { },
        visibility: true,
        opacity: 1,
        title: "OrthoPhoto Imagery",
        className: "HSLayers.Layer.WMS",
        wmsMaxScale: 0,
        maxResolution: null,
        minResolution: 0,
        url: "http%3A%2F%2Fgeoportal.kraj-lbc.cz%2Fcgi-bin%2Fwms4otn%3F",
        params: {
            LAYERS: "ortofoto",
            FROMCRS: "EPSG:3857",
            VERSION: "1.3.0"
        }
    },{
        metadata: { },
        visibility: true,
        opacity: 1,
        title: "Shaded relief",
        className: "HSLayers.Layer.WMS",
        wmsMaxScale: 0,
        maxResolution: null,
        minResolution: 0,
        url: "http%3A%2F%2Fgeoportal.kraj-lbc.cz%2Fcgi-bin%2Fwms4otn%3F",
        params: {
            LAYERS: "stinovany_relief",
            FROMCRS: "EPSG:3857",
            VERSION: "1.3.0"
        }
    }
]
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.