Re: Maps and barcharts
Brent Wood <[email protected]>
| Newsgroups | gmane.comp.gis.freegis |
|---|---|
| Message-ID | <[email protected]> |
--- Jose Gomez-Dans <[email protected]> wrote: > Hi! > We have a lot of data in different formats (shapefiles, tables...). We want > to move all this data to a database (read: PostGIS) in order to produce the > sort of studies we have been producing so far with very labour intensive > methods :) Way to go, that's exactly what I'm trying to do, with reasonable success, here in New Zealand. > So far, so good. PostGIS spatial queries are awesome, and coupled with > Python, > Matplotlib and LaTeX, I am producing very good looking reports. However, it > is producing adding cartography to this mix. I have in the past used GMT for > raster data, and I guess I could convert WellKnownText into something that > GMT understands. However, there is a need to produce cartography with pie > charts, bar charts and other stuff on them, something like what this image > shows: <http://www.redcar-cleveland.gov.uk/YrCounc1.nsf/map-piecharts.gif> > (this is just a random example found googling around). Even automatically > producing simple maps of vector data coloured by attribute (with a nice > legend, scale bar et al.) would be very helpful. > > Is there some FOSS framework to accomplish this task? Hi Jose, This should be of interest.... I have been given access to some $$ to fund the development of an OGR GMT driver, so PostGIS data can be directly written to GMT format (& vice versa), using ogr2ogr (also shapefiles, etc). I think this will pretty much accomplish much of what you are asking. This project is very recent, and Paul Wessel (GMT developer) has suggested addressing some of the limits in the way GMT handles vector data, which will require modifications and header support in GMT vector data files. I'm discussing this with Paul, after which I'll be posting the proposal to the GMT mailing list for discussion & comment. We want to include basic topology (ie; polygons with holes) and attribute data for the spatial features in a structure which is bacwards compatible with existing GMT code. We're probably not that far away. My funding is limited, so if anyone else is able to contribute in the case of this revised capability exceeding the amount I have availble, it may be useful (and give you some say in what we finish up with :-) I have also used GMT to generate pie charts on maps, looking just a good as other GMT output. My script iterated through the data fields for each point, drawing the wedges for each field in separate passes. If you define your map space by a cartesian space covering your data extent, GMT can also draw very effectrive graphs & scatterplots. Slightly cumbersome, but the results are fine. You could also use the gd primitives to build up graphs, I know the graphs on www.netcraft.com are done this way (as an example), and they cover a fair range of outputs. You can use ImageMagick to convert these to sun rasters & put them on your GMT map with GMT. Cheers, Brent Wood ____________________________________________________________________________________ Sponsored Link Rates near historic lows - $200,000 mortgage for $660/ month - http://yahoo.ratemarketplace.com