Add support to export loss maps to GeoJSON

Bug #1198843 reported by Lars Butler
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake Engine
Fix Released
High
Lars Butler

Bug Description

This will add the first piece of support for a new output type: (Geo)JSON.

Possible structure for loss maps as GeoJSON:

{'features': [{'geometry': {'coordinates': [-116.0, 41.0], 'type': 'Point'},
               'properties': {'losses': [{'assetRef': 'asset_1',
                                          'value': '15.23'},
                                         {'assetRef': 'asset_2',
                                          'value': '32.66'}]},
               'type': 'Feature'},
              {'geometry': {'coordinates': [-116.0, 42.0], 'type': 'Point'},
               'properties': {'losses': [{'assetRef': 'asset_3',
                                          'value': '64.23'}]},
               'type': 'Feature'}],
 'oqmetadata': {'gsimTreePath': 'b3_b4',
                'investigationTime': '50.0',
                'lossCategory': 'economic_loss',
                'poE': '0.5',
                'sourceModelTreePath': 'b1_b2',
                'unit': 'EUR'},
 'oqtype': 'LossMap',
 'oqnrmlversion': '0.4',
 'type': 'FeatureCollection'}

NOTE -- The addition of the geojson lossmap writer to nrmllib is covered here: https://bugs.launchpad.net/oq-nrmllib/+bug/1198881

description: updated
Changed in oq-engine:
milestone: none → 1.0.1
assignee: nobody → Lars Butler (lars-butler)
importance: Undecided → High
status: New → In Progress
description: updated
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :

Second (and probably final) pull request: https://github.com/gem/oq-engine/pull/1227

Changed in oq-engine:
status: In Progress → Fix Committed
Changed in oq-engine:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.