[GRASS-dev] NVIZ state file format (was GRASS6.3 on Windows, nviz)
Dylan Beaudette
dylan.beaudette at gmail.com
Tue Aug 28 15:09:24 EDT 2007
On Tuesday 28 August 2007 11:43, Michael Barton wrote:
> AFAICT, the current situation is that NVIZ will not properly read the state
> file that it writes. To 'fix' it to read it with the current file format
> and code approach will result in an incomplete 'fix' in that it still won't
> read parts of the state file properly.
>
> XML is a potentially good idea, but requires an external library AND I
> don't know XML well enough to implement this.
My 2 cents here. If we are using XML in other parts of GRASS (via external
parsing libs) I think that it would be good to standardize on some flavor of
XML for any misc. things like the NVIZ state file. XML is simple to read in a
text editor, simple to parse with external tools, and simple to read/write
with the appropriate libs.
>
> I *think* I can fix it so that NVIZ in GRASS 6.3 can properly read and
> configure itself from a state file. BUT, I need to change the state file
> format a little bit to make it parseable. Basically, I need to add section
> delimiters (e.g., "start surf", "end surf").
This would be fairly simple in XML:
<surface>
<id>1</id>
<name>elevation</name>
<source>elev at mapset></source>
<colormap>elev at mapset</colormap>
... other properties
</surface>
this type of construct could be used to define all of the pieces in the
statefile, so that they can be *directly* read from the document tree:
get/set methods work on:
surface->id->property->value
> Should I go ahead and do this if I can?
>
> Alternatively, if someone else would like to take this on, I'd be more than
> happy.
thats the kicker... I do not know enough about XML in a C environment to do
this / and a MS thesis is looming over my head right now... Sorry!
Thanks for the hard work Michael,
Dylan
> Michael
>
> On 8/27/07 12:31 PM, "Glynn Clements" <glynn at gclements.plus.com> wrote:
> > Michael Barton wrote:
> >> I don't know enough about xml (either creating or parsing in TclTk) to
> >> implement this, although it sounds like a viable idea otherwise.
> >
> > As NVIZ is a hybrid C+Tcl/Tk application, you can use an external
> > library (e.g. libxml) for parsing.
> >
> > Parsing XML in Tcl isn't viable, IMHO.
>
> __________________________________________
> Michael Barton, Professor of Anthropology
> Director of Graduate Studies
> School of Human Evolution & Social Change
> Center for Social Dynamics and Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
More information about the grass-dev
mailing list