[GRASS-user] Re: grass-user Digest, Vol 71, Issue 31
Raphael.Viscarra-Rossel at csiro.au
Raphael.Viscarra-Rossel at csiro.au
Thu Mar 15 17:57:12 EDT 2012
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 at lists.osgeo.org<mailto:grass-user-request at lists.osgeo.org>" <grass-user-request at lists.osgeo.org<mailto:grass-user-request at lists.osgeo.org>> wrote:
Send grass-user mailing list submissions to
grass-user at lists.osgeo.org<mailto:grass-user at 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 at lists.osgeo.org<mailto:grass-user-request at lists.osgeo.org>
You can reach the person managing the list at
grass-user-owner at lists.osgeo.org<mailto:grass-user-owner at 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 at gclements.plus.com<mailto:glynn at gclements.plus.com>>
Subject: Re: [GRASS-user] I do not understand how
region/projection/coordinate system are intertwined
To: Fridtjof Schiefenh ? vel <der_ber at gmx.de<mailto:der_ber at gmx.de>>
Cc: grass-user at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
Message-ID: <20321.64265.761937.829664 at cerise.gclements.plus.com<mailto:20321.64265.761937.829664 at 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 at gclements.plus.com<mailto:glynn at gclements.plus.com>>
------------------------------
Message: 2
Date: Thu, 15 Mar 2012 14:40:34 +0000
From: Glynn Clements <glynn at gclements.plus.com<mailto:glynn at gclements.plus.com>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Tyler Smith <tyler.smith at mail.mcgill.ca<mailto:tyler.smith at mail.mcgill.ca>>
Cc: grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>
Message-ID: <20321.65378.978043.32115 at cerise.gclements.plus.com<mailto:20321.65378.978043.32115 at 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 at gclements.plus.com<mailto:glynn at gclements.plus.com>>
------------------------------
Message: 3
Date: Thu, 15 Mar 2012 14:50:54 +0000
From: Glynn Clements <glynn at gclements.plus.com<mailto:glynn at gclements.plus.com>>
Subject: Re: [GRASS-user] Why Does Re-projection Increase Disk Space
Used? [UPDATE]
To: Rich Shepard <rshepard at appl-ecosys.com<mailto:rshepard at appl-ecosys.com>>
Cc: grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>
Message-ID: <20322.462.169858.947314 at cerise.gclements.plus.com<mailto:20322.462.169858.947314 at 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 at gclements.plus.com<mailto:glynn at gclements.plus.com>>
------------------------------
Message: 4
Date: Thu, 15 Mar 2012 08:06:11 -0700 (PDT)
From: Rich Shepard <rshepard at appl-ecosys.com<mailto:rshepard at appl-ecosys.com>>
Subject: Re: [GRASS-user] Why Does Re-projection Increase Disk Space
Used? [UPDATE]
To: grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>
Message-ID:
<alpine.LNX.2.00.1203150803030.30945 at salmo.appl-ecosys.com<mailto:alpine.LNX.2.00.1203150803030.30945 at 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 at mail.mcgill.ca<mailto:tyler.smith at mail.mcgill.ca>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Glynn Clements <glynn at gclements.plus.com<mailto:glynn at gclements.plus.com>>
Cc: "grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>" <grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>>
Message-ID:
<CADkt+ZsPAMaUhgjHctrWVKVVjVcEXHSEusXvFZ7_psb26tWr2g at mail.gmail.com<mailto:CADkt+ZsPAMaUhgjHctrWVKVVjVcEXHSEusXvFZ7_psb26tWr2g at mail.gmail.com>>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, Mar 15, 2012 at 10:40 AM, Glynn Clements
<glynn at gclements.plus.com<mailto:glynn at 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 at appl-ecosys.com<mailto:rshepard at appl-ecosys.com>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: "grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>" <grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>>
Message-ID:
<alpine.LNX.2.00.1203150824550.30945 at salmo.appl-ecosys.com<mailto:alpine.LNX.2.00.1203150824550.30945 at 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 at mail.mcgill.ca<mailto:tyler.smith at mail.mcgill.ca>>
Subject: Re: [GRASS-user] grass prompt when changing locations
To: Rich Shepard <rshepard at appl-ecosys.com<mailto:rshepard at appl-ecosys.com>>
Cc: "grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>" <grass-users at lists.osgeo.org<mailto:grass-users at lists.osgeo.org>>
Message-ID:
<CADkt+Zu3hon1q3108zWi2cZitFFC=s7ueA60kk9wPJxS9nJoSQ at mail.gmail.com<mailto:CADkt+Zu3hon1q3108zWi2cZitFFC=s7ueA60kk9wPJxS9nJoSQ at mail.gmail.com>>
Content-Type: text/plain; charset=ISO-8859-1
On Thu, Mar 15, 2012 at 11:27 AM, Rich Shepard <rshepard at appl-ecosys.com<mailto:rshepard at 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 at lists.osgeo.org<mailto:grass-user at lists.osgeo.org>
http://lists.osgeo.org/mailman/listinfo/grass-user
End of grass-user Digest, Vol 71, Issue 31
******************************************
More information about the grass-user
mailing list