Closed donnacalhoun closed 9 years ago
It looks like KML tools is already placing gauge place marks. A possible extension is to include gauge figures in the placemark balloons. Maybe also also get rid of the "driving directions" to the gauges (:-))
I added the capability to view gauge plots when clicking Placemarks. The only thing (assuming this is a desirable feature) is that I didn't quite know how to get the proper figure name to refer to. It looks like this might require additional arguments to the gauges2kml routine, but wasn't sure. If someone would like to take a look, that would be great.
You mean the title of the plot?
I mean the actual file name - something like "gauges32412fig300.png". Since only the rundata is passed into gauges2kml, I don't have easy access to the figure number. And even if I had plotdata, I am not sure how I would go about matching up the gauge data set in rundata with the corresponding figures stored in plotdata. (I just checked kmltools again, and see that I can just call setplot.py from gauges2kml directly, so maybe this partially solves the problem).
A related question is where should gauges2kml (and regions2kml) be called from. Right now, I think that Randy just calls these from the command line. But it could be called from within plotpages (when the KML files are being created) or from frametools (which might have easier access to the rundata).
Oh, hmmm. Do you have access to the figure objects? You could snag the title of the axes and discern the name of the figure from that possibly.
I would favor calling gauges2kml
from within plotpages
or where ever makes the most sense rather than having a separate call.
I got something working using plotdata._gauge_pngfile
. It could use a look over, but seem to be working well with the two examples I have tried so far.
What file and lines are the implementation on?
For example, line 405 in kmltools.py (my googleearth branch)
Sorry for being daft but where is the kmltools.py
file?
geoclaw/src/python/geoplot/kmltools.py
Looks fine to me, there would be better ways to do this if they keys were not so weird.
great - thanks for taking a look. Can I close this issue? Or would you like to give this a spin with your code? Shouldn't be too hard ...see the setplot.py file in the chile2010 example.
I just tried it out and it works for me.
add place marks in GE that the user can click on to get gauge data