[GRASSLIST:881] Re: Live Earthquake Map: GRASS/PHP

Hamish hamish_nospam at yahoo.com
Tue Apr 25 23:19:58 EDT 2006


> > >  http://grass.itc.it/spearfish/php_grass_earthquakes.php
> > >  Recent Earthquakes: map generated by GRASS on the fly with PHP
..
> > For finer-grained circle sizes, with ps.map you can use the sizecol
> > option with the vpoints command. Or d.vect.chart can do this, or
> > 'v.buffer bufcol='.
> > 
> > maybe better to plot circles as e^boom as it's based on a log scale?
> 
> I liked the d.vect.thematic, maybe improve this?

I haven't touched d.vect.thematic but it can be done a bit simpler now,
I've just added symbol support to d.graph. (via a new D_symbol() library fn)
Some time ago d.mapgraph was merged into d.graph as well (-m).


> For now I have used the "nint" parameter to define more classes. For
> unknown reasons the use of
>   themecalc="custom_breaks" breakpoints="0 1 2 3 4 5 6 7 8 9 10"
> fails in the PHP script (no time now to investigate) which would be
> better.

Don't know.

> I also tried to play with the where option to recolor the circles
> on their age as USGS does. But I didn't come up with a working
> SQL statement (to select field values minus some days etc). The use
> of v.reclass would be good, but one has to figure out how to do
> classification on dates.

Probably have to do a little YYYYMMDD -> julian day or YYYY.YYYYYY
conversion first, then floating point classification. Maybe a SQL
guru knows an easier way..



I notice on the USGS page they center the world on 180 lon. May I
suggest the same for your map?  "g.region w=0 e=360"

oops, that won't work anymore.. the >90 lat tweak broke it:
G61> g.region w=0 e=360
G61> d.redraw
WARNING: Fixing subtle input data rounding error of east boundary
         (180>1e-06)
G61> g.region -p
WARNING: Fixing subtle input data rounding error of east boundary
         (180>1e-06)
projection: 3 (Latitude-Longitude)
zone:       0
datum:      wgs84
ellipsoid:  wgs84
north:      90N
south:      90S
west:       0
east:       180E
nsres:      0:05
ewres:      0:05
rows:       2160
cols:       2160


This needs to be fixed, lon needs to be able to go up to 360
(remember mars example...)

The previous code allowed you to go endlessly east or west on input, so
just rip out east/west boundary fixes? (ie only keep >90lat fix)


Hamish




More information about the grass-user mailing list