geosolutions-it / gfdrr-det

Data Exploration Tool
https://waffle.io/geosolutions-it/gfdrr-det
GNU General Public License v3.0
3 stars 0 forks source link

Client configuration static JSON structure #78

Closed giohappy closed 6 years ago

giohappy commented 6 years ago

We can provide the following static configuration for the moment. Later detail filters styles should automatically match those defined in Geoserver,

Taxonomy (filter codes) can be obtained from https://github.com/geosolutions-it/gfdrr-det/blob/dev/gfdrr_det/settings/base.py#L696

{
    "list": {
        "exposures": {
            "category": [
                {
                    "name": "Buildings",
                    "colors_range": [
                        "#ff42d0",
                        "#fb4168"
                    ],
                    "icon": "building",
                    "filters": [
                        {
                            "name": "Buildings",
                            "code": "buildings"
                        }
                    ]
                },
                {
                    "name": "Infrastructure",
                    "colors_range": [
                        "#423aed",
                        "#41fbf0"
                    ],
                    "icon": "road",
                    "filters": [
                        {
                            "name": "Roads",
                            "code": "road_network"
                        },
                        {
                            "name": "Rail",
                            "code": "rail"
                        },
                        {
                            "name": "Pipelines",
                            "code": "pipelines"
                        },
                        {
                            "name": "Storage Tanks",
                            "code": "storage_tanks"
                        },
                        {
                            "name": "Power Grid",
                            "code": "power_grid"
                        },
                        {
                            "name": "Bridges",
                            "code": "bridges"
                        },
                        {
                            "name": "Energy",
                            "code": "energy"
                        }
                    ]
                },
                {
                    "name": "Agriculture",
                    "colors_range": [
                        "#aaff33",
                        "#d9c80e"
                    ],
                    "icon": "leaf",
                    "filters": [
                        {
                            "name": "Crops",
                            "code": "crops"
                        },
                        {
                            "name": "Livestock",
                            "code": "livestock"
                        },
                        {
                            "name": "Forestry",
                            "code": "forestry"
                        }
                    ]
                },
                {
                    "name": "Social",
                    "colors_range": [
                        "#333333",
                        "#dddddd"
                    ],
                    "icon": "users",
                    "filters": [
                        {
                            "name": "People",
                            "code": "people"
                        }
                    ]
                }
            ]
        },
        "hazards": {},
        "vulnerabilities": {}
    },
    "detail": {
        "exposures": {
            "buildings": [
                {
                    "name": "Construction",
                                        "code": "construction_material",
                    "filters": [
                        {
                            "name": "Masonry",
                            "color": "#9e0142",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Concrete",
                            "color": "#ea5d47",
                                                         "code": <out taxon code>
                        },
                        {
                            "name": "Steel Frame",
                            "color": "#fdbf6f",
                                                         "code": <out taxon code>
                        },
                        {
                            "name": "Composite",
                            "color": "#ffffbf",
                                                         "code": <out taxon code>
                        },
                        {
                            "name": "Wood",
                            "color": "#bfe5a0",
                                                         "code": <out taxon code>
                        },
                        {
                            "name": "Earth",
                            "color": "#55afad",
                                                         "code": <out taxon code>
                        },
                        {
                            "name": "Unknown",
                            "color": "#5e4fa2",
                                                        "code": <out taxon code>
                        }
                    ]
                },
                {
                    "name": "Occupancy",
                                        "code":  "occupancy"
                    "filters": [
                        {
                            "name": "Residential",
                            "color": "#9e0142",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Commercial",
                            "color": "#ea5d47",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Industrial",
                            "color": "#fdbf6f",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Healthcare",
                            "color": "#ffffbf",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Education",
                            "color": "#bfe5a0",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Government",
                            "color": "#55afad",
                                                        "code": <out taxon code>
                        },
                        {
                            "name": "Unknown",
                            "color": "#5e4fa2",
                                                        "code": <out taxon code>
                        }
                    ]
                }
            ]
        },
        "hazards": {},
        "vulnerabilities": {}
    }
}
giohappy commented 6 years ago

fiexd in #95