[GRASS-user] mapcalc/mapcalculator in python script

On 02/01/2011 03:28 PM, Johannes Radinger wrote:
> Hello,
>
> I am running GRASS GIS 6.5 and want to run a python script
> including a mapcaluculator-expression of a simple formula:
>
> A=if(B,C)
>
> grass.mapcalc("$upstream_shreve = if(${upstream_part},${shreve})",
> upstream_shreve = options['upstream_shreve'],
> upstream_part = options['upstream_part'],
> shreve = options['shreve'])
>
> but that isn't working... I don't know whats excaclty the problem....

I don't know anything about python, but I had a similar problem under R,
where the problem was escaping of the formula - the formula needed to be
enclosed in " in grass.
To diagnose: can you see the command executed under GRASS? Does it work
if you paste this into GRASS?

Cheers,

Rainer

hello,

I still don't know whats the exact problem. And it is not directly possible to paste it into GRASS as the options command is processed by
the g.parser module in the end of my script. That's sofar as I understand...

I am not sure if something is wrong with ' and " or with the options-commands. According to the manual (http://grass.osgeo.org/wiki/GRASS_and_Python#Example_for_embedding_r.mapcalc_.28map_algebra.29)
it should work that way...

hopefully someone can help me...

cheers
johannes

>
> hopefully you can help me
>
> thanks
> Johannes

- --
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation
Biology, UCT), Dipl. Phys. (Germany)

Centre of Excellence for Invasion Biology
Natural Sciences Building
Office Suite 2039
Stellenbosch University
Main Campus, Merriman Avenue
Stellenbosch
South Africa

Tel: +33 - (0)9 53 10 27 44
Cell: +27 - (0)8 39 47 90 42
Fax (SA): +27 - (0)8 65 16 27 82
Fax (D) : +49 - (0)3 21 21 25 22 44
Fax (FR): +33 - (0)9 58 10 27 44
email: Rainer@krugs.de

--
NEU: FreePhone - kostenlos mobil telefonieren und surfen!
Jetzt informieren: http://www.gmx.net/de/go/freephone

I am reading through
http://en.wikipedia.org/wiki/Manifold_System
It claims:
"Release 7.00 was issued in May 2006 and followed up by Release 7x in the
next three months. 7x was released in two flavors: 32-bit and 64-bit.
Manifold 7x was the first ever 64-bit GIS application in the industry."

Does any know when GRASS 64-bit was first released?

Regards
Sab

I am also pretty sure that QGIS (Quantum GIS) was available as a 64bit version before 2006.

I don't know exactly when 64bit QGIS became available, though. I personally started with QGIS in about 2006 and there was already a 64bit version.

Andreas

On Wed, 2 Feb 2011 16:40:22 -0000, wrote:

I am reading through
http://en.wikipedia.org/wiki/Manifold_System
It claims:
"Release 7.00 was issued in May 2006 and followed up by Release 7x in the
next three months. 7x was released in two flavors: 32-bit and 64-bit.
Manifold 7x was the first ever 64-bit GIS application in the industry."

Does any know when GRASS 64-bit was first released?

Regards
Sab

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

--
--
Andreas Neumann
Böschacherstrasse 10A
8624 Grüt (Gossau ZH)
Switzerland

On Wed, Feb 2, 2011 at 5:40 PM, <razmjooeis@faunalia.co.uk> wrote:

I am reading through
http://en.wikipedia.org/wiki/Manifold_System
It claims:
"Release 7.00 was issued in May 2006 and followed up by Release 7x in the
next three months. 7x was released in two flavors: 32-bit and 64-bit.
Manifold 7x was the first ever 64-bit GIS application in the industry."

If we are not industry, maybe yes :stuck_out_tongue:

Changelog:
http://grass.osgeo.org/grass64/source/snapshot/ChangeLog.gz
2005-07-12 15:11 markus
        * added 64bit notes

2005-07-15 11:40 markus
        * advertise 64bit support if activated

No claim that I did the work of course! It was the effort of multiple
developers, just above traces I could easily find.

Does any know when GRASS 64-bit was first released?

http://grass.osgeo.org/announces/announce_grass500pre2.html
GRASS GIS 5.0.0pre2 released 13 September 2001
"Platforms supported by GRASS:
Linux, Sun Solaris, Sun Solaris/Intel, Silicon Graphics Irix, HP-UX,
DEC-Alpha, PowerPC, MacOS X, AIX, BSD, CRAY and other UNIX compliant
platforms (32/64bit), experimentally Windows NT/2000 running Cygnus
"

... so that was way before 2006.

Markus

Excellent...that's fixed for them!
Cheers
Sab

On Wed, Feb 2, 2011 at 5:40 PM, <razmjooeis@faunalia.co.uk> wrote:

I am reading through
http://en.wikipedia.org/wiki/Manifold_System
It claims:
"Release 7.00 was issued in May 2006 and followed up by Release 7x in
the
next three months. 7x was released in two flavors: 32-bit and 64-bit.
Manifold 7x was the first ever 64-bit GIS application in the industry."

If we are not industry, maybe yes :stuck_out_tongue:

Changelog:
http://grass.osgeo.org/grass64/source/snapshot/ChangeLog.gz
2005-07-12 15:11 markus
        * added 64bit notes

2005-07-15 11:40 markus
        * advertise 64bit support if activated

No claim that I did the work of course! It was the effort of multiple
developers, just above traces I could easily find.

Does any know when GRASS 64-bit was first released?

http://grass.osgeo.org/announces/announce_grass500pre2.html
GRASS GIS 5.0.0pre2 released 13 September 2001
"Platforms supported by GRASS:
Linux, Sun Solaris, Sun Solaris/Intel, Silicon Graphics Irix, HP-UX,
DEC-Alpha, PowerPC, MacOS X, AIX, BSD, CRAY and other UNIX compliant
platforms (32/64bit), experimentally Windows NT/2000 running Cygnus
"

... so that was way before 2006.

Markus

I don't think non-commercial enterprises get considered in "Industry"
sometimes. So the statement is sorta true from their perspective (though
not in reality). Also in the context of applications that run on a
Windows OS it wouldn't be surprising because there wasn't a stable 64
bit windows back then to use 64bit applications on. That's still
somewhat the case, Manifold is one of the only GIS applications that
runs on Windows that you can buy a 64bit version of.

As long as I can remember since I first installed GRASS and QGIS on my
Ubuntu box I've had 64bit versions running. I know for sure I can trace
that back to Breezy Badger in 2005. It's actually mirky further back
because I can't find a package list online for older versions of Debian
but my guess is they've had 64bit GRASS since the "2001" release
mentioned previously. So not sure when it went from, you can compile 64
bit to it's one-click installable as a package happened.

Thanks,
Alex

On 02/02/2011 09:49 AM, Markus Neteler wrote:

On Wed, Feb 2, 2011 at 5:40 PM, <razmjooeis@faunalia.co.uk> wrote:

I am reading through
http://en.wikipedia.org/wiki/Manifold_System
It claims:
"Release 7.00 was issued in May 2006 and followed up by Release 7x in the
next three months. 7x was released in two flavors: 32-bit and 64-bit.
Manifold 7x was the first ever 64-bit GIS application in the industry."

If we are not industry, maybe yes :stuck_out_tongue:

Changelog:
http://grass.osgeo.org/grass64/source/snapshot/ChangeLog.gz
2005-07-12 15:11 markus
        * added 64bit notes

2005-07-15 11:40 markus
        * advertise 64bit support if activated

No claim that I did the work of course! It was the effort of multiple
developers, just above traces I could easily find.

Does any know when GRASS 64-bit was first released?

http://grass.osgeo.org/announces/announce_grass500pre2.html
GRASS GIS 5.0.0pre2 released 13 September 2001
"Platforms supported by GRASS:
Linux, Sun Solaris, Sun Solaris/Intel, Silicon Graphics Irix, HP-UX,
DEC-Alpha, PowerPC, MacOS X, AIX, BSD, CRAY and other UNIX compliant
platforms (32/64bit), experimentally Windows NT/2000 running Cygnus
"

... so that was way before 2006.

Markus

razmjooeis wrote:

> I am reading through http://en.wikipedia.org/wiki/Manifold_System
> It claims:
> "Release 7.00 was issued in May 2006 and followed up by
> Release 7x in the next three months. 7x was released in two
> flavors: 32-bit and 64-bit.
> Manifold 7x was the first ever 64-bit GIS application
> in the industry."

Markus N:

If we are not industry, maybe yes :stuck_out_tongue:

(yes, we count :slight_smile:

Changelog:
http://grass.osgeo.org/grass64/source/snapshot/ChangeLog.gz
2005-07-12 15:11 markus
* added 64bit notes

2005-07-15 11:40 markus
* advertise 64bit support if
activated

No claim that I did the work of course! It was the effort
of multiple developers, just above traces I could easily find.

ISTR that Brad did a lot of work cleaning things up and
modernizing it. (?)

> Does any know when GRASS 64-bit was first released?

http://grass.osgeo.org/announces/announce_grass500pre2.html
GRASS GIS 5.0.0pre2 released 13 September 2001
"Platforms supported by GRASS:
Linux, Sun Solaris, Sun Solaris/Intel, Silicon Graphics
Irix, HP-UX,
DEC-Alpha, PowerPC, MacOS X, AIX, BSD, CRAY and other UNIX
compliant
platforms (32/64bit), experimentally Windows NT/2000
running Cygnus
"

... so that was way before 2006.

DEC-Alpha and Sun's SPARC chips were 64-bit since forever, and we
did ship official Solaris binaries once upon a time (did Paul
make those?).

I'd hazard a guess that there was a 64 bit [capable] release of
GRASS, used in production, 10 years if not more before the above
date of 2006. e.g. anyone know what hardware Lockheed-Martin were
running to run GRASS back then? I'm guessing it wasn't cheap 386s,
and anyway that predates the GRASS port to & rise of linux in
'96(??).

So my guess for the first 64 bit GRASS would be early 90s with
the emergence of the 64bit RISC chips. I never had a CRAY to
play with though, & don't know the history there. :slight_smile:

Hamish

On Wed, 2 Feb 2011, Hamish wrote:

DEC-Alpha and Sun's SPARC chips were 64-bit since forever, and we
did ship official Solaris binaries once upon a time (did Paul
make those?).

ftp://ftp.qub.ac.uk/pub/users/paulk/grass/

Unfortunately they are only 32-bit though (and also the original upload date of the files seems to have been lost in a server upgrade). I also made some IRIX binaries but they were also 32-bit.

Paul

... just doing a reverse search through the grass6 CVS changelog, the first
relevant CVS log message I see is:

2000-01-02 13:29 markus

        * src/CMD/generic/is64bit.sh: Bill Hughes: automatically choosing
        the diglib64 library at compile-time for 64-bit machines

As this is just 4 days after Markus first put the code into CVS, I think it
is safe to assume that there was earlier 64bit support than that.

Those changes would have been in GRASS 5 beta6 released 16 Feb 2000.
Presumably before that you had to tell it to compile for 64 bit manually.

see also grass5/ALPHA64/README.alpha64 and

http://lists.osgeo.org/pipermail/grass-user/1999-August/002398.html

Hamish