The workflow that we use in the desktop GUI is as follow (in schematic).
Set the output environment using the PNG driver and associated environmental variables
run d.vect, d.rast, etc -> these produce temporary *.pnm (or *.png) files
composite the individual *.pnm files into a single graphic file using g.pnmcomp (another compositer could be used like wxPython graphic tools)
display the final, composited *.pnm file in a wxPython canvas
With the proper environmental settings, this works so fast that there is little time lag. For a web based version, it will take more time to send the image back to the desktop from the server than to do the rendering.
Hope this is helpful. Good luck with it.
Michael
____________________
C. Michael Barton
Director, Center for Social Dynamics & Complexity
Professor of Anthropology, School of Human Evolution & Social Change
Arizona State University
voice: 480-965-6262 (SHESC), 480-727-9746 (CSDC)
fax: 480-965-7671 (SHESC), 480-727-0709 (CSDC)
www: http://www.public.asu.edu/~cmbarton, http://csdc.asu.edu
On Nov 30, 2011, at 7:07 AM, <grass-dev-request@lists.osgeo.org> wrote:
Date: Tue, 29 Nov 2011 19:31:18 +0530
From: Mohammed Rashad <mohammedrashadkm@gmail.com>
Subject: [GRASS-dev] visualize GRASS vector/raster on web
To: grass-dev@lists.osgeo.org
Message-ID:
<CANNqv9cYVD_ArDQKmUiuye6HQCY4viQpuYwBkhKGVernvj=8rg@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"how to visualize vector/raster from directly from GRASS database?
I am building webGRASS. for that I linked GRASS GIS all libraries to my
application without any wrappers..
Now I can execute any grass command online. But for rendering I use
OpenLayers. I want to change OpenLayers and use a WPaintWidget to draw
raster and vector dataI can make this happen in this way
[1] call d.vect which will call v.out.ogr and create a gml file --> display
gml on OpenLayers.MapNow I want to reduce the overhead by spawning different process like d.vect
--> v.out.ogr --> gml -->openlayers
I need rendering this way[2] Read GRASS data directly from database (points/line/polygon for vector
and image pixel values from GRASS raster format
so the chain will be
GRASS Raster data --> (image pixel values) MyNewMapCanvas
GRASS Vector data --->(points/lines/polygons) MyNewMapCanvasThe reason behind my need is that on web it will increase speed and
efficiency when we read data from GRASS database directlyAll I want to do GRASS GIS core language C/C++ to make a web application
it is possible because I am linking my website with required grass
libraries (libgrass_*)Any help will be greatly appreciated..
--
Regards,
Mohammed Rashad K M
M.S. (By Research) student
Lab for Spatial Informatics
Department of CSE
International Institute of Information Technology
Hyderabad, India