[GRASS-user] error message from GRASS 7 on mac os

Hi,

sorry for the omission of a descriptive subject line in my previous message.

I have recently upgraded to GRASS 7 (from 6.4) in my mac running snow leopard 10.6.8.
All frameworks updated. The software starts fine...and so far appears to work OK but for some error messages in the terminal window:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (proj1):~ > Fri Mar 16 08:48:08 raw.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0

Also, previews in cartographic composer that need python imaging library is not working - related to the above?

I searched for other's experience with this and found some, but not solutions. Any help to fix this will be apprecaited.

Thank you,

Raphael.
________________________________________
From: grass-user-bounces@lists.osgeo.org [grass-user-bounces@lists.osgeo.org] On Behalf Of grass-user-request@lists.osgeo.org [grass-user-request@lists.osgeo.org]
Sent: Friday, 16 March 2012 4:15 PM
To: grass-user@lists.osgeo.org
Subject: grass-user Digest, Vol 71, Issue 32

Send grass-user mailing list submissions to
        grass-user@lists.osgeo.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://lists.osgeo.org/mailman/listinfo/grass-user
or, via email, send a message with subject or body 'help' to
        grass-user-request@lists.osgeo.org

You can reach the person managing the list at
        grass-user-owner@lists.osgeo.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-user digest..."

Today's Topics:

   1. Re: grass prompt when changing locations (Rich Shepard)
   2. v.in.ogr from PostGIS - how to avoid primary key to become
      cat (Patrick S.)
   3. Re: windows format for temporary file path (Richard Edmonds)
   4. Re: windows format for temporary file path (Martin Landa)
   5. Re: Strange r.slope.aspect output of Aster dem (leonidas)
   6. Re: grass-user Digest, Vol 71, Issue 31
      (Raphael.Viscarra-Rossel@csiro.au)
   7. Re: windows format for temporary file path (Glynn Clements)

----------------------------------------------------------------------

Message: 1
Date: Thu, 15 Mar 2012 09:29:03 -0700 (PDT)
From: Rich Shepard <rshepard@appl-ecosys.com>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: "grass-users@lists.osgeo.org" <grass-users@lists.osgeo.org>
Message-ID:
        <alpine.LNX.2.00.1203150928430.30945@salmo.appl-ecosys.com>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 15 Mar 2012, Tyler Smith wrote:

Absolutely, I'm planning to do that shortly (and will announce it on this
list). Probably this weekend - I just need to tidy it up a bit and open
the bitbucket repository.

Tyler,

   Thanks.

Rich

------------------------------

Message: 2
Date: Thu, 15 Mar 2012 18:38:55 +0100
From: "Patrick S." <patrick_GIS@gmx.ch>
Subject: [GRASS-user] v.in.ogr from PostGIS - how to avoid primary key
        to become cat
To: grass mailing list <grass-user@lists.osgeo.org>
Message-ID: <4F62292F.7070509@gmx.ch>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

Dear list,

sorry for writing several times in such a short time, but every start is
a little hard....
When importing from PostGIS, v.in.ogr will remove the column with the
primary key and use the objects as "cat". Is there a way to avoid this
behaviour, e.g a flag?
I just copied the table now in SQL, and imported the copy, but I guess
that is not really the best way to handle this.

During my search I found a post to the mailing-list from 2008 on this
issue, but no answer to that one.

patrick

------------------------------

Message: 3
Date: Fri, 16 Mar 2012 09:20:14 +1300
From: Richard Edmonds <richard.edmonds@lasra.co.nz>
Subject: Re: [GRASS-user] windows format for temporary file path
To: Glynn Clements <glynn@gclements.plus.com>
Cc: grass-user@lists.osgeo.org
Message-ID: <4F624EFE.7060109@lasra.co.nz>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed

On 16/03/2012 3:13 a.m., Glynn Clements wrote:

It's possible that it's being used where it isn't appropriate
(i.e. where an absolute path is appropriate), but it's also possible
that you're passing an absolute path where a simple filename (or even
a map name) is actually required.

Ah that makes sense,
I was trying to use it to generate, then remove a temporary layer for
use in the v.to.rast command. Apologies for not posting the command
which generated the error.

I have changed my bash script with the following which now generates
only a name rather than a path and at least now the v.to.rast command runs.

temp1="$$1"
v.to.rast --overwrite input=$GIS_OPT_INPUT output=$temp1 use=attr
column=elevation

However I still get that error when I try to remove the layer/file. I
had inferred from the g.remove man page that:

g.remove rast=$temp1

would remove the raster layer $temp1 but instead i get the error:
Removing raster <39281>
raster: couldn't be removed

trying it with:

g.remove rast=`g.tempfile pid=$$1`

generates the error I described originally but does look closer to
actually removing the layer:

Removing raster <E:\GRASSdata/newLocation/PERMANENT/.tmp/35001.0>
Illegal filename. Character </> not allowed.
Raster map <E:\GRASSdata/newLocation/PERMANENT/.tmp/35001.0> not found
Illegal filename. Character </> not allowed.
raster: couldn't be removed
Illegal filename. Character </> not allowed.
header: couldn't be removed
Illegal filename. Character </> not allowed.
category: couldn't be removed
Illegal filename. Character </> not allowed.
color: couldn't be removed
Illegal filename. Character </> not allowed.
history: couldn't be removed
Illegal filename. Character </> not allowed.
misc: couldn't be removed
Illegal filename. Character </> not allowed.
fcell: couldn't be removed
Illegal filename. Character </> not allowed.
g3dcell: couldn't be removed
Illegal filename. Character </> not allowed.
colr2/PERMANENT: couldn't be removed
<E:\GRASSdata/newLocation/PERMANENT/.tmp/35001.0> nothing removed

Sorry the error dump is so long, but I'm having real trouble dealing
with these pesky temporary layers.

Hopefully if I get this sorted then a search for "create and remove
temporary layers in bash for GRASS GIS" will turn up a working solution
which I couldn't find previously. Perhaps I should start a new thread?

Richard

------------------------------

Message: 4
Date: Thu, 15 Mar 2012 21:29:59 +0100
From: Martin Landa <landa.martin@gmail.com>
Subject: Re: [GRASS-user] windows format for temporary file path
To: Glynn Clements <glynn@gclements.plus.com>
Cc: grass-user@lists.osgeo.org, Richard Edmonds
        <richard.edmonds@lasra.co.nz>
Message-ID:
        <CA+Ei1OfR1DaUq+rDdf+buOyZQjzSqcTo-kzv-9Lp0YE9CP52Cg@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

2012/3/15 Glynn Clements <glynn@gclements.plus.com>:

which, on echo, generated E:\GRASSdata/newLocation/PERMANENT/.tmp/9168.0

and in use results in the following error:
Illegal filename. Character </> not allowed.
<E:\GRASSdata/newLocation/PERMANENT/.tmp/7512.0> is an illegal file name

In what context does the error occur?

btw, probably we could introduce in pythonlib new function for
generating temp map names?

tempmap() -> tmp_argv[0]_pid_num, eg. `temp_r_in_wms_7512.0` (`dot` is
not allowed for vector maps).

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

------------------------------

Message: 5
Date: Thu, 15 Mar 2012 14:02:16 -0700 (PDT)
From: leonidas <leonidas_liakos@yahoo.gr>
Subject: [GRASS-user] Re: Strange r.slope.aspect output of Aster dem
To: grass-user@lists.osgeo.org
Message-ID: <1331845336015-4623064.post@n6.nabble.com>
Content-Type: text/plain; charset=us-ascii

The problem was solved (at least visually removed the fishnet) using *-r
cubic* in gdalwarp.
Thank you for your information!

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Strange-r-slope-aspect-output-of-Aster-dem-tp4571755p4623064.html
Sent from the Grass - Users mailing list archive at Nabble.com.

------------------------------

Message: 6
Date: Fri, 16 Mar 2012 08:57:12 +1100
From: <Raphael.Viscarra-Rossel@csiro.au>
Subject: [GRASS-user] Re: grass-user Digest, Vol 71, Issue 31
To: <grass-user@lists.osgeo.org>
Message-ID: <CB88ADD0.D0EE%raphael.viscarra-rossel@csiro.au>
Content-Type: text/plain; charset="us-ascii"

Hi,
I have recently upgraded to GRASS 7 (from 6.4) in my mac running snow leopard 10.6.8.
All frameworks updated. The software starts fine but for some error messages in the terminal window:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (proj1):~ > Fri Mar 16 08:48:08 raw.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0

I searched for other's experience with this and found some, but not solutions. Any thoughts on how to fix this will be apprecaited.
Thank you,
Raphael.

On 16/03/12 3:00 AM, "grass-user-request@lists.osgeo.org<mailto:grass-user-request@lists.osgeo.org>" <grass-user-request@lists.osgeo.org<mailto:grass-user-request@lists.osgeo.org>> wrote:

Send grass-user mailing list submissions to
grass-user@lists.osgeo.org<mailto:grass-user@lists.osgeo.org>

To subscribe or unsubscribe via the World Wide Web, visit
http://lists.osgeo.org/mailman/listinfo/grass-user
or, via email, send a message with subject or body 'help' to
grass-user-request@lists.osgeo.org<mailto:grass-user-request@lists.osgeo.org>

You can reach the person managing the list at
grass-user-owner@lists.osgeo.org<mailto:grass-user-owner@lists.osgeo.org>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of grass-user digest..."

Today's Topics:

   1. Re: I do not understand how region/projection/coordinate
      system are intertwined (Glynn Clements)
   2. Re: grass prompt when changing locations (Glynn Clements)
   3. Re: Why Does Re-projection Increase Disk Space Used? [UPDATE]
      (Glynn Clements)
   4. Re: Why Does Re-projection Increase Disk Space Used? [UPDATE]
      (Rich Shepard)
   5. Re: grass prompt when changing locations (Tyler Smith)
   6. Re: grass prompt when changing locations (Rich Shepard)
   7. Re: grass prompt when changing locations (Tyler Smith)

----------------------------------------------------------------------

Message: 1
Date: Thu, 15 Mar 2012 14:22:01 +0000
From: Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>
Subject: Re: [GRASS-user] I do not understand how
region/projection/coordinate system are intertwined
To: Fridtjof Schiefenh ? vel <der_ber@gmx.de<mailto:der_ber@gmx.de>>
Cc: grass-user@lists.osgeo.org<mailto:grass-user@lists.osgeo.org>
Message-ID: <20321.64265.761937.829664@cerise.gclements.plus.com<mailto:20321.64265.761937.829664@cerise.gclements.plus.com>>
Content-Type: text/plain; charset=iso-8859-1

Fridtjof Schiefenh?vel wrote:

it seems I can't solve this problem:
->create a location with a mercator projection (i want to have degrees as the coordinate system)

That's a contradiction. Only lat/lon locations use degrees as the
coordinate system. A Mercator projection (whether "normal" Mercator,
transverse, or oblique) has coordinates in distance units (usually
either metres or feet).

A Mercator projection /can't/ have coordinates in degrees, as
coordinates have to be linear while Mercator has one coordinate vary
non-linearly with the angle from the tangent circle.

--
Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>

------------------------------

Message: 2
Date: Thu, 15 Mar 2012 14:40:34 +0000
From: Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Tyler Smith <tyler.smith@mail.mcgill.ca<mailto:tyler.smith@mail.mcgill.ca>>
Cc: grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>
Message-ID: <20321.65378.978043.32115@cerise.gclements.plus.com<mailto:20321.65378.978043.32115@cerise.gclements.plus.com>>
Content-Type: text/plain; charset=us-ascii

Tyler Smith wrote:

> my prompt looks like this:
>
> GRASS 6.4.1 (dem):~ >
>
> The reference to the location '(dem)' stays, even after changing to
> another location. How do I make Grass update this?

The new environment variables are stored in the $LOCATION_NAME/$MAPSET/.bashrc file (if you're using bash). But this file is not 'source'ed when changing mapsets. So you need to do:
eval `g.gisenv`
source $GISDBASE/$LOCATION_NAME/$MAPSET/.bashrc

or manually reset the prompt:
export PS1="GRASS-6.4.2 ($LOCATION_NAME) \w > "

There is no .bashrc file in the mapset directory, so I take it I would
have to set that up for each mapset in each location?

It's created when you start a GRASS session. There's no point in
creating it manually, as it will never be read, and will be
overwritten the next time you start a GRASS session in that directory.

Creating the .bashrc file in the mapset directory is something of a
hack. The startup script sets HOME to the mapset directory so that the
.bash_history file will be created there (so each mapset gets its own
command history). That causes the .bashrc file file to be read from
the mapset directory; the .bashrc file then restores HOME.

Manually resetting the prompt works fine, after eval 'g.gisenv`, so
that is what I'm using now.

There isn't any simple way to fix this. A command such as g.mapset
cannot change the environment of another process (e.g. the shell from
which g.mapset was run).

--
Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>

------------------------------

Message: 3
Date: Thu, 15 Mar 2012 14:50:54 +0000
From: Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>
Subject: Re: [GRASS-user] Why Does Re-projection Increase Disk Space
Used? [UPDATE]
To: Rich Shepard <rshepard@appl-ecosys.com<mailto:rshepard@appl-ecosys.com>>
Cc: grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>
Message-ID: <20322.462.169858.947314@cerise.gclements.plus.com<mailto:20322.462.169858.947314@cerise.gclements.plus.com>>
Content-Type: text/plain; charset=us-ascii

Rich Shepard wrote:

    Related question: if they're no longer needed, why doesn't grass remove
them from the hard drive?

Which OS?

r.proj calls remove() on the temporary file immediately after opening
it. On Unix, that removes the directory entry, and will cause the file
itself to be deleted as soon as r.proj terminates. On Windows, the
remove() call will fail (you can't delete an open file on Windows),
and the file will be left behind.

--
Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>

------------------------------

Message: 4
Date: Thu, 15 Mar 2012 08:06:11 -0700 (PDT)
From: Rich Shepard <rshepard@appl-ecosys.com<mailto:rshepard@appl-ecosys.com>>
Subject: Re: [GRASS-user] Why Does Re-projection Increase Disk Space
Used? [UPDATE]
To: grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>
Message-ID:
<alpine.LNX.2.00.1203150803030.30945@salmo.appl-ecosys.com<mailto:alpine.LNX.2.00.1203150803030.30945@salmo.appl-ecosys.com>>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 15 Mar 2012, Glynn Clements wrote:

Which OS?

   Linux.

r.proj calls remove() on the temporary file immediately after opening it.
On Unix, that removes the directory entry, and will cause the file itself
to be deleted as soon as r.proj terminates. On Windows, the remove() call
will fail (you can't delete an open file on Windows), and the file will be
left behind.

   For some reason, then, it's not working here. Slackware-13.1/x486 and
-13.37/x86_64.

   On the latter host I found two files in ../.tmp/<hostname>/: <pid>.1 and
<pid>.2. The former was almost 100G in size and the latter was >10G. The
source raster file is 45M in size.

Thanks, Glynn,

Rich

------------------------------

Message: 5
Date: Thu, 15 Mar 2012 11:07:46 -0400
From: Tyler Smith <tyler.smith@mail.mcgill.ca<mailto:tyler.smith@mail.mcgill.ca>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Glynn Clements <glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>>
Cc: "grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>" <grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>>
Message-ID:
<CADkt+ZsPAMaUhgjHctrWVKVVjVcEXHSEusXvFZ7_psb26tWr2g@mail.gmail.com<mailto:CADkt+ZsPAMaUhgjHctrWVKVVjVcEXHSEusXvFZ7_psb26tWr2g@mail.gmail.com>>
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Mar 15, 2012 at 10:40 AM, Glynn Clements
<glynn@gclements.plus.com<mailto:glynn@gclements.plus.com>> wrote:

Tyler Smith wrote:
Manually resetting the prompt works fine, after eval 'g.gisenv`, so
that is what I'm using now.

There isn't any simple way to fix this. A command such as g.mapset
cannot change the environment of another process (e.g. the shell from
which g.mapset was run).

Thanks for the explanation Glynn.

I'm running Grass from Emacs, and have written the rough framework of
a dedicated Grass mode. So instead of running g.mapset, I call M-x
grass-change-location, which prompts for location and mapset, then
calls g.mapset with that information. The final piece was getting the
same function to reset the prompt, and now it's relatively seamless.

Cheers,

Tyler

------------------------------

Message: 6
Date: Thu, 15 Mar 2012 08:27:01 -0700 (PDT)
From: Rich Shepard <rshepard@appl-ecosys.com<mailto:rshepard@appl-ecosys.com>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: "grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>" <grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>>
Message-ID:
<alpine.LNX.2.00.1203150824550.30945@salmo.appl-ecosys.com<mailto:alpine.LNX.2.00.1203150824550.30945@salmo.appl-ecosys.com>>
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed

On Thu, 15 Mar 2012, Tyler Smith wrote:

I'm running Grass from Emacs, and have written the rough framework of a
dedicated Grass mode. So instead of running g.mapset, I call M-x
grass-change-location, which prompts for location and mapset, then calls
g.mapset with that information. The final piece was getting the same
function to reset the prompt, and now it's relatively seamless.

Tyler,

   Are you willing to share your .el with the rest of us who depend on emacs
for text editing? I use ESS (Emacs Speaks S) when I'm writing and running R
statistical models in emacs, and the modes for SQL, Python, and C. I can
appreciate the advantages of running grass within it.

Rich

------------------------------

Message: 7
Date: Thu, 15 Mar 2012 11:47:21 -0400
From: Tyler Smith <tyler.smith@mail.mcgill.ca<mailto:tyler.smith@mail.mcgill.ca>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Rich Shepard <rshepard@appl-ecosys.com<mailto:rshepard@appl-ecosys.com>>
Cc: "grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>" <grass-users@lists.osgeo.org<mailto:grass-users@lists.osgeo.org>>
Message-ID:
<CADkt+Zu3hon1q3108zWi2cZitFFC=s7ueA60kk9wPJxS9nJoSQ@mail.gmail.com<mailto:CADkt+Zu3hon1q3108zWi2cZitFFC=s7ueA60kk9wPJxS9nJoSQ@mail.gmail.com>>
Content-Type: text/plain; charset=ISO-8859-1

On Thu, Mar 15, 2012 at 11:27 AM, Rich Shepard <rshepard@appl-ecosys.com<mailto:rshepard@appl-ecosys.com>> wrote:
On Thu, 15 Mar 2012, Tyler Smith wrote:

I'm running Grass from Emacs, and have written the rough framework of a
dedicated Grass mode. So instead of running g.mapset, I call M-x
grass-change-location, which prompts for location and mapset, then calls
g.mapset with that information. The final piece was getting the same
function to reset the prompt, and now it's relatively seamless.

Tyler,

? Are you willing to share your .el with the rest of us who depend on emacs
for text editing? I use ESS (Emacs Speaks S) when I'm writing and running R
statistical models in emacs, and the modes for SQL, Python, and C. I can
appreciate the advantages of running grass within it.

Absolutely, I'm planning to do that shortly (and will announce it on
this list). Probably this weekend - I just need to tidy it up a bit
and open the bitbucket repository.

Cheers,

Tyler

------------------------------

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org<mailto:grass-user@lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-user

End of grass-user Digest, Vol 71, Issue 31
******************************************

------------------------------

Message: 7
Date: Fri, 16 Mar 2012 05:14:34 +0000
From: Glynn Clements <glynn@gclements.plus.com>
Subject: Re: [GRASS-user] windows format for temporary file path
To: Richard Edmonds <richard.edmonds@lasra.co.nz>
Cc: grass-user@lists.osgeo.org
Message-ID: <20322.52282.598197.151869@cerise.gclements.plus.com>
Content-Type: text/plain; charset=us-ascii

Richard Edmonds wrote:

> It's possible that it's being used where it isn't appropriate
> (i.e. where an absolute path is appropriate), but it's also possible
> that you're passing an absolute path where a simple filename (or even
> a map name) is actually required.

Ah that makes sense,
I was trying to use it to generate, then remove a temporary layer for
use in the v.to.rast command. Apologies for not posting the command
which generated the error.

I have changed my bash script with the following which now generates
only a name rather than a path and at least now the v.to.rast command runs.

temp1="$$1"

The "usual" convention for temporary map names is to combine the name
of the script, "tmp", and the current PID, e.g.:

        temprast="myscript.tmp.$$"

Use of the PID should ensure uniqueness even amongst multiple
concurrent runs of the script in a single mapset (which shouldn't
happen anyhow), and anyone using ".tmp." in a "real" map name is
asking for trouble.

v.to.rast --overwrite input=$GIS_OPT_INPUT output=$temp1 use=attr
column=elevation

However I still get that error when I try to remove the layer/file. I
had inferred from the g.remove man page that:

g.remove rast=$temp1

would remove the raster layer $temp1 but instead i get the error:
Removing raster <39281>
raster: couldn't be removed

"$$" evaluates to the PID of the shell running the script. "$$1" will
be that PID with a "1" appended to it. So the above error indicates
that the PID was 3928.

There doesn't appear to be anything wrong with your commands; whatever
value is chosen for temp1, I would expect "g.remove rast=$temp1" to
remove the map created by "v.to.rast ... output=$temp1", provided that
it hasn't changed in the meantime.

--
Glynn Clements <glynn@gclements.plus.com>

------------------------------

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

End of grass-user Digest, Vol 71, Issue 32
******************************************

On Sat, Mar 17, 2012 at 6:04 AM, <Raphael.Viscarra-Rossel@csiro.au> wrote:

Hi,

sorry for the omission of a descriptive subject line in my previous message.

(Please also remove irrelevant pieces from the message, especially when
receiving in digest mode, thanks)

I have recently upgraded to GRASS 7 (from 6.4) in my mac running snow leopard 10.6.8.
All frameworks updated. The software starts fine...and so far appears to work OK but for some error messages in the terminal window:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (proj1):~ > Fri Mar 16 08:48:08 raw.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0

Also, previews in cartographic composer that need python imaging library is not working - related to the above?

I searched for other's experience with this and found some, but not solutions. Any help to fix this will be apprecaited.

@devs: I wonder if the hint in
http://trac.wxwidgets.org/ticket/4272

would help which suggests the usage of wx.CallAfter
(http://wiki.wxpython.org/CallAfter)

Markus

On Mar 17, 2012, at 12:04 AM, <Raphael.Viscarra-Rossel@csiro.au> <Raphael.Viscarra-Rossel@csiro.au> wrote:

Also, previews in cartographic composer that need python imaging library is not working - related to the above?

Did you install PIL? It's a separate package to install (I have one on my Python page). I didn't realize PIL was used in the GUI now. I'll add it to the list of requirements.

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

On Sat, Mar 17, 2012 at 7:48 AM, Markus Neteler <neteler@osgeo.org> wrote:

On Sat, Mar 17, 2012 at 6:04 AM, <Raphael.Viscarra-Rossel@csiro.au> wrote:

Hi,

sorry for the omission of a descriptive subject line in my previous message.

(Please also remove irrelevant pieces from the message, especially when
receiving in digest mode, thanks)

I have recently upgraded to GRASS 7 (from 6.4) in my mac running snow leopard 10.6.8.
All frameworks updated. The software starts fine...and so far appears to work OK but for some error messages in the terminal window:

Launching <wxpython> GUI in the background, please wait...
GRASS 7.0.svn (proj1):~ > Fri Mar 16 08:48:08 raw.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0
Fri Mar 16 08:48:08 raw2-bu.local pythonw2.6[618] <Error>: CGContextRestoreGState: invalid context 0x0

Also, previews in cartographic composer that need python imaging library is not working - related to the above?

I searched for other's experience with this and found some, but not solutions. Any help to fix this will be apprecaited.

@devs: I wonder if the hint in
http://trac.wxwidgets.org/ticket/4272

would help which suggests the usage of wx.CallAfter
(http://wiki.wxpython.org/CallAfter)

Hi,

I added CallAfter as suggested (r51089), let's see if it helps.

Anna

Markus
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi,

On Sat, Mar 17, 2012 at 3:06 PM, William Kyngesburye
<woklist@kyngchaos.com> wrote:

On Mar 17, 2012, at 12:04 AM, <Raphael.Viscarra-Rossel@csiro.au> <Raphael.Viscarra-Rossel@csiro.au> wrote:

Also, previews in cartographic composer that need python imaging library is not working - related to the above?

Did you install PIL? It's a separate package to install (I have one on my Python page). I didn't realize PIL was used in the GUI now. I'll add it to the list of requirements.

PIL is required because wxPython is not able to display PostScript
file which is the product of underlying module ps.map.

Anna

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

First Pogril: Why is life like sticking your head in a bucket filled with hyena offal?
Second Pogril: I don't know. Why IS life like sticking your head in a bucket filled with hyena offal?
First Pogril: I don't know either. Wretched, isn't it?

-HitchHiker's Guide to the Galaxy

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user