[GRASS-user] Python Script for changing raster values

2010-09-07 Thread Luisa Peña
Greetings

I have a classification raster (with values that ranges from 1-20) and I
need to reclassify them. I mean, to change (as an example):
1-  255
2-  100
3 - 150

and I need to implement this on a Python script. What do you suggest to do?
I mean, that is the most robust and easy way to implement this?
Thanks
Luisa
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Python Script for changing raster values

2010-09-07 Thread Christian Schwartze
Following code could be one approach:

os.system(cat %s | r.recode input=map_a output=map_recl % path_to_rules)

where path_to_rules is a previously created (temp) file containg the 
reclassifiying rules as for example:

1:1:1.1:1.1
2:2:7.5:7.5
3:3:0.4:0.4

Christian.




From: Luisa Peña 
Sent: Tuesday, September 07, 2010 12:37 PM
To: GRASS user list 
Subject: [GRASS-user] Python Script for changing raster values


Greetings 


I have a classification raster (with values that ranges from 1-20) and I need 
to reclassify them. I mean, to change (as an example):
1-  255
2-  100
3 - 150


and I need to implement this on a Python script. What do you suggest to do? I 
mean, that is the most robust and easy way to implement this?
Thanks
Luisa





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


[GRASS-user] NetCDF Data in GRASS?

2010-09-07 Thread LeeDaniel

Hello all,

Does anybody have any experience with integrating NetCDF data into GRASS?
That's a ton of great data and I'm wondering if there's a direct way of
importing such files into a GRASS database. I've seen scripts that convert
them to ArcGRID format, but that's not a very elegant solution, especially
if you're dealing with long time series.

Thanks a bunch!
Daniel
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/NetCDF-Data-in-GRASS-tp5506213p5506213.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] NetCDF Data in GRASS?

2010-09-07 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 07/09/10 14:29, LeeDaniel wrote:
 
 Hello all,
 
 Does anybody have any experience with integrating NetCDF data into GRASS?

No experience myself, but gdal can read them, so you should be able to
get them into grass.

Cheers,

Rainer

 That's a ton of great data and I'm wondering if there's a direct way of
 importing such files into a GRASS database. I've seen scripts that convert
 them to ArcGRID format, but that's not a very elegant solution, especially
 if you're dealing with long time series.
 
 Thanks a bunch!
 Daniel

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyGSFkACgkQoYgNqgF2egqYsQCfXy4eA/NYCPR9Dw9bFQrMY2kv
UEIAn3DBAI3Prexv3uP9a5B1ec5ma7tA
=KE2L
-END PGP SIGNATURE-
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] GRASS starting problem - Mac

2010-09-07 Thread schorschli

Hi,

After a Mac-security-update I can't start GRASS anymore.
I keep geting the same error:

Dyld Error Message:
  Library not loaded:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
  Referenced from:
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
  Reason: no suitable image found.  Did find:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD:
unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00
0x00


I allready tried to reinstalled GRASS (using the newest installer from
http://www.kyngchaos.com/software/grass)

Any idea what could be wrong and how to fix this?

Thanks,

Schorschli
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/GRASS-starting-problem-Mac-tp5506724p5506724.html
Sent from the Grass - Users mailing list archive at Nabble.com.
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] GRASS starting problem - Mac

2010-09-07 Thread William Kyngesburye
Looks like your system got corrupted.  Maybe an interrupted security update, 
though recent updates haven't touched QD.framework (according to timestamps on 
my Macs).  Or some other poorly-made installer or updater messed around in the 
system.  Are you having problems with any other applications?

If you use Time Machine, I'd try restoring a previous state.  Otherwise you may 
have to reinstall the system.

Just to be sure - you did install the correct GRASS package for your system?  
Leopard/Snow Leopard - 10.5/10.6.

On Sep 7, 2010, at 9:51 AM, schorschli wrote:

 
 Hi,
 
 After a Mac-security-update I can't start GRASS anymore.
 I keep geting the same error:
 
 Dyld Error Message:
  Library not loaded:
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD
  Referenced from:
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices
  Reason: no suitable image found.  Did find:
 
 /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD:
 unknown file type, first eight bytes: 0x00 0x00 0x00 0x00 0x00 0x00 0x00
 0x00
 
 
 I allready tried to reinstalled GRASS (using the newest installer from
 http://www.kyngchaos.com/software/grass)
 
 Any idea what could be wrong and how to fix this?
 
 Thanks,
 
 Schorschli
 -- 
 View this message in context: 
 http://osgeo-org.1803224.n2.nabble.com/GRASS-starting-problem-Mac-tp5506724p5506724.html
 Sent from the Grass - Users mailing list archive at Nabble.com.
 ___
 grass-user mailing list
 grass-user@lists.osgeo.org
 http://lists.osgeo.org/mailman/listinfo/grass-user

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

We are at war with them. Neither in hatred nor revenge and with no particular 
pleasure I shall kill every ___ I can until the war is over. That is my duty.

Don't you even hate 'em?

What good would it do if I did? If all the many millions of people of the 
allied nations devoted an entire year exclusively to hating the  it 
wouldn't kill one ___ nor shorten the war one day.

Ha, ha And it might give 'em all stomach ulcers.

- Tarzan, on war

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


Re: [GRASS-user] Python Script for changing raster values

2010-09-07 Thread Glynn Clements

Christian Schwartze wrote:

 Following code could be one approach:
 
 os.system(cat %s | r.recode input=map_a output=map_recl % path_to_rules)
 
 where path_to_rules is a previously created (temp) file containg the
 reclassifiying rules as for example:

os.system() shouldn't be used. E.g. the above will fail if
path_to_rules contains spaces (as is often the case on Windows).

The preferred approach for the above command is:

grass.run_command(r.recode, input=map_a,
output=map_recl, rules = path_to_rules)

If you have a command which requires input via stdin (rather from a
named file), use e.g.:

rules_f = open(path_to_rules, r)
try:
grass.run_command(r.recode, input=map_a,
output=map_recl, stdin = rules_f)
finally:
rules_f.close()

Or, if you can rely upon Python 2.5 or later, use:

from __future__ import with_statement
with open(path_to_rules, r) as rules_f:
grass.run_command(r.recode, input=map_a,
output=map_recl, stdin = rules_f)

Also, even in shell scripts cat file | command is suboptimal; use
command  file instead.

-- 
Glynn Clements gl...@gclements.plus.com
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


[GRASS-user] GRASS GIS 6.4.0 released

2010-09-07 Thread Markus Neteler
*Press Release
The GRASS Development Team announces* GRASS GIS 6.4.0 released
 We are pleased to announce the release of GRASS GIS
6.4.0http://grass.osgeo.org/,
the first in the new line of 6.4 stable releases. As a stable release 6.4
will enjoy long-term support. The next release (6.4.1) will introduce a few
new features which are still undergoing final testing, but after that all
further 6.4 releases will be bugfix-only. Due to our highly conservative
stabilization policy this is the first official version of GRASS to
introduce new features since October 2006 and supersedes the previous stable
line of GRASS 6.2. As such the floodgates are open and there are many new
features to explore and many new structural improvements to be found in the
software.

GRASS 6.4 brings a number of exciting enhancements to the GIS. Our new
*wxPython
graphical user interface* (wxGUI) is debuted, Python is now a fully
supported scripting language, and for the first time since its inception
with a port from the VAX 11/780 in 1983, GRASS will now run natively on a
non-UNIX based platform: MS-Windows! In addition to bringing the software to
a host of new users, the ability to run GRASS on any common computer
platform furthers our goal of open access to the software. We hope you will
enjoy the ability to use this program on the systems that are most
convenient to you and your work.

Due to the freshness of *WinGrass* there may still be a few rough edges yet
to discover, but after more than a year of dedicated testing and
quality-assurance review we are very pleased with the results. Users can be
confident to use this version for their day to day work, indeed due to the
open development model many already do. Existing UNIX and Mac users will be
happy to know that these new features do not disrupt the base GIS which
remains as solid as ever and fully backwards compatible with earlier GRASS
6.0 and 6.2 releases. The venerable Tcl/Tk GUIs are also still available if
you prefer to use them.

The GRASS software including over 400 built-in analysis modules and 100
community supplied add-on modules and toolboxes can be downloaded for free
from the main GRASS website at http://grass.osgeo.org, or from many local
mirrors worldwide. In addition to the extensive documentation which comes
with the software, our Wiki help system
http://grass.osgeo.org/wikicontains a wealth of user supplied tips
and tricks, tutorials, and guides.

Since 6.4 entered the testing phase work has begun on GRASS 7 and is
progressing rapidly, including many new wxGUI improvements and tools which
we hope to bring over for the upcoming 6.4.1 release.
About GRASS GIS The *Geographic Resources Analysis Support System*, commonly
referred to as GRASS, is a Geographic Information System (GIS) providing
powerful raster, vector, and geospatial processing engines in a single
integrated software suite. GRASS includes tools for spatial modeling,
visualization of raster and vector data, management and analysis of
geospatial data, and the processing of satellite and aerial imagery. It also
provides the capability to produce sophisticated presentation graphics and
hardcopy maps. GRASS has now been translated into twenty languages and
supports a huge array of data formats.

GRASS is a founding member of The Open Source Geospatial
Foundationhttp://www.osgeo.org/(OSGeo), a non-profit legal entity
which has enjoyed extraordinary growth.
We expect that this formal infrastructure will guarantee that the GRASS
community will be well supported and vibrant far into the future.

GRASS is currently used around the world in academic and commercial settings
as well as by many governmental agencies and environmental consulting
companies. It runs on a variety of popular hardware platforms and is Free
open-source software released under the terms of the GNU General Public
License http://www.gnu.org/licenses/gpl-2.0.html.

Users are encouraged to study, customize, extend, improve, and (if
necessary) diagnose and repair the inner workings of any part of the
program. We believe that scientific progress depends on the reproducibility
of results, which in turn depends on the unhindered ability of the user to
know, evaluate, double-check, and learn from all algorithms and
methodologies used in the process of their work.
Screenshots

   - Screenshots http://grass.osgeo.org/screenshots/index.php of GRASS in
   action

Platforms supported by GRASS

GNU/Linux, Mac OS X/Darwin, Microsoft Windows (native using MinGW or with
full UNIX support via Cygwin), Sun Solaris (SPARC/Intel), Silicon Graphics
Irix, HP-UX, DEC-Alpha, AIX, the BSD family, iPAQ/Linux and other UNIX
compliant platforms. GRASS runs on both 32 and 64 bit systems with large
data file (2GB) support for most key modules.
Software download/CDROM

   - http://grass.osgeo.org http://grass.osgeo.org/download/index.php
   - http://grass.ibiblio.org http://grass.ibiblio.org/download/index.php
   - numerous mirror sites 

Re: [GRASS-user] NetCDF Data in GRASS?

2010-09-07 Thread Hamish
LeeDaniel wrote:
  Does anybody have any experience with integrating NetCDF
  data into GRASS?

Rainer wrote:
 No experience myself, but gdal can read them, so you should
 be able to get them into grass.

right, see  http://grass.osgeo.org/wiki/NetCDF

(feel free to expand that page)

pre-processing into a GeoTiff with gdal_translate is a
possibility, and gdalinfo should generally be the first thing
you do anyway.


Hamish



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