Impact Calculator copied to new structure

3 views
Skip to first unread message

Andreas Hocevar

unread,
Aug 10, 2011, 12:01:32 PM8/10/11
to risik...@googlegroups.com
Hi,

as of today, the Calculator is available in a basic viewer app. The app does not have a header yet, but it does have a GetFeatureInfo button so users can click on the map and get information. Note that this currently only works for layers added through the Add Layers (+) button.

The code is committed to master. To see it in action, pull the latest from git, run risiko-install, and navigate to http://localhost:8000/static/calculator/index.html.

None of the code has been refactored so far. I only copied it over from its current location, removed some lint, changed the application specific language files to the gxp structure, and formatted the code so I can see what's going on.

I was not able to do much testing, because I don't have an exposure layer. Where do I get one? Or do I have one aleady and just don't know it? I was able to select a Hazard in the Impact Calculator, but I don't see any Exposure. And the api returns me an empty object for the exposure category: {"objects": []}. Any advice on this?

Feedback welcome.

Andreas.

--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

Ole Nielsen

unread,
Aug 10, 2011, 9:31:45 PM8/10/11
to risik...@googlegroups.com
Hi and thanks for the update. We are very excited to check it out.

There are some instructions regarding setting up the server with the bundled demo data at
https://github.com/AIFDR/riab/blob/master/README.rst

It boils down to
risiko-activate
risiko-start
risiko-upload risiko_demo_data

Cheers
Ole

Andreas Hocevar

unread,
Aug 11, 2011, 5:05:26 AM8/11/11
to risik...@googlegroups.com, Ole Nielsen
Hi Ole,

I followed this readme and uploaded the demo data like instructed, but I didn't get any exposure layers with that.

Andreas.

Ole Nielsen

unread,
Aug 11, 2011, 6:04:13 AM8/11/11
to Andreas Hocevar, risik...@googlegroups.com
With the current implementation, exposure layers won't show up until a hazard layer as been selected. The admissible layers and plugin function is controlled by the keywords. This is by no mans finished, though.

Try to select the earthquake ground shaking layer as hazard. Then you should be able to pick either population_2010 or AIBEP schools.

Cheers
Ole

Jeffrey Johnson

unread,
Aug 11, 2011, 6:27:33 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Ole,

Andreas has selected a hazard layer, and is not seeing the exposure
layers. We (Ariel and I) are noticing something wrong with our
environments here that is causing many of the tests to fail because of
some problem with keywords (just shoot me now) ... and this is
probably the same problem Andreas is having ... but _your_ machine
does work (ariel just tested now) ... so he is investigating what is
different between the installations and will try to solve it and
re-post the py packages to both amazon and to the local jakarta
machine.

Will send an update soon as we have something to let y'all know

Jeff

Ole Nielsen

unread,
Aug 11, 2011, 6:41:23 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
OK - got it.
Does e.g. test 21 work for you guys?
What doew the test suite produce for Andras?

o

Ole Nielsen

unread,
Aug 11, 2011, 6:44:33 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Sorry, try e.g. risiko-test 27 (not 21) and let me know if that passes or whether keywords are missing?
Thanx
Ole

Jeffrey Johnson

unread,
Aug 11, 2011, 6:46:29 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Not sure how andrea's enviro is setup, but I suspect that it has about
6 failing and 1 error like ours. Ariel is on it now.

fyi, the new font based symbology is all hooked up into the
calculator. See my commits and the screenshot below. *Obviously* need
to work on the actual cartography tomorrow, but nice to see it hooked
in.

https://github.com/AIFDR/riab/commit/b4f06490aca5c1a4c87557f0c955b3d08533ffa2
https://github.com/AIFDR/riab/commit/7757ef2a7f5a9cd6ff561e85d1bdc6153856cdf3

https://skitch.com/ortelius/fqa18/risiko-calculator-geonode

Andreas, any comments on the methodology above are appreciated since
you know much more about SLD than I do.

Jeff


On Thu, Aug 11, 2011 at 5:41 PM, Ole Nielsen

Ole Nielsen

unread,
Aug 11, 2011, 6:54:23 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Mate - it is the OWSLib patch :-)
It is only implemented on shiva and nowhere else :-)

Cheers
Ole

Jeffrey Johnson

unread,
Aug 11, 2011, 6:59:10 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Lemme try that :)

On Thu, Aug 11, 2011 at 5:54 PM, Ole Nielsen

Ole Nielsen

unread,
Aug 11, 2011, 7:03:22 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
I can confirm that after installing OWSLib according to the patch in https://github.com/AIFDR/riab/issues/115 the test suite works as expected (i.e. only the two tests to do with Geoserver not doing the second upload fail). CanĀ  you confirm that works for you and also help Andreas get that done.

Cheers
Ole

Jeffrey Johnson

unread,
Aug 11, 2011, 7:04:46 AM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
That one-liner goes at about line 249 in
riab_env/src/owslib/owslib/coverage/wcs100.py

Actual line doesnt matter, just has to be with the rest of the self.xxx calls.

Andreas, lemme know if that makes a difference for you?

Jeff

On Thu, Aug 11, 2011 at 6:03 PM, Ole Nielsen

Andreas Hocevar

unread,
Aug 11, 2011, 7:36:50 AM8/11/11
to Jeffrey Johnson, risik...@googlegroups.com
This sequence won't work anyway, because the exposure layers list is fetched from the server before a hazard is selected. And the server returns an empty object for it.

Andreas.

Andreas Hocevar

unread,
Aug 11, 2011, 7:40:02 AM8/11/11
to Jeffrey Johnson, risik...@googlegroups.com
Hey Jeff,

I haven't really used TTF symbols in SLD so far, but what you did looks sane to me.

Andreas.

Andreas Hocevar

unread,
Aug 11, 2011, 7:50:36 AM8/11/11
to Jeffrey Johnson, risik...@googlegroups.com
Hi,

unfortunately this does not make a difference. I still get

{"objects": []}

from

http://localhost:8000/api/v1/layers/?category=exposure

Andreas.

Ole Nielsen

unread,
Aug 11, 2011, 7:50:43 PM8/11/11
to risik...@googlegroups.com, Andreas Hocevar
Jeff is right, the patch only makes a difference to the test suite as we haven't yet made the changes that rely on this feature.
-o
Reply all
Reply to author
Forward
0 new messages