riesgos / dlr-riesgos-frontend

Deutsches Zentrum für Luft- und Raumfahrt e.V. * (German Aerospace Center), German Remote Sensing Data Center * Department: Geo-Risks and Civil Security
https://riesgos.de
Apache License 2.0
2 stars 1 forks source link

Frontend: from process get both wms- and shakemap-output #19

Closed MichaelLangbein closed 5 years ago

MichaelLangbein commented 5 years ago

Usually, we want a wms-output for the frontend and a shakemap-output (or similar) for the next downstream-process.

MichaelLangbein commented 5 years ago

In the case of shakyground, this is easily resolved: just request two outputs in the output-document, both with the same product-id, but different mime-types (one as 'application/wms', the other as 'text/xml'. The response will contain an entry with a WMS-GetMap-URL, and another entry with the shakemap.

Example in curl: curl -X POST \ 'http://rz-vm140.gfz-potsdam.de/wps/WebProcessingService?service=WPS&request=Execute&version=1.0.0&identifier=org.n52.gfz.riesgos.algorithm.impl.ShakygroundProcess' \ -H 'Accept: /' \ -H 'Accept-Encoding: gzip, deflate' \ -H 'Cache-Control: no-cache' \ -H 'Connection: keep-alive' \ -H 'Content-Length: 2164' \ -H 'Content-Type: text/xml' \ -H 'Host: rz-vm140.gfz-potsdam.de' \ -H 'Postman-Token: 589f55a0-0ede-4508-901c-17dbfb88d4e4,4fe35edb-388a-4e1a-8b51-0ae32832d2e6' \ -H 'User-Agent: PostmanRuntime/7.15.2' \ -H 'cache-control: no-cache' \ -d '

org.n52.gfz.riesgos.algorithm.impl.ShakygroundProcess quakeMLFile quakeMLFile [{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-71.955,-31.7627]},"properties":{"publicID":"quakeml:quakeledger/CHOA_120","preferredOriginID":"quakeml:quakeledger/CHOA_120","preferredMagnitudeID":"quakeml:quakeledger/CHOA_120","type":"earthquake","description.text":"expert","origin.publicID":"quakeml:quakeledger/CHOA_120","origin.time.value":"2018-01-01T00:00:00.000000Z","origin.depth.value":"32.0","origin.creationInfo.value":"GFZ","magnitude.publicID":"quakeml:quakeledger/CHOA_120","magnitude.mag.value":"8.5","magnitude.type":"MW","magnitude.creationInfo.value":"GFZ","focalMechanism.publicID":"quakeml:quakeledger/CHOA_120","focalMechanism.nodalPlanes.nodalPlane1.strike.value":"9.0","focalMechanism.nodalPlanes.nodalPlane1.dip.value":"18.0","focalMechanism.nodalPlanes.nodalPlane1.rake.value":"90.0","focalMechanism.nodalPlanes.preferredPlane":"nodalPlane1"},"id":"quakeml:quakeledger/CHOA_120"}]}] shakeMapFile shakeMapFile '