[GRASS-user] change the cell value of a geotiff

2010-01-20 Thread maven apache
Hi:
I have a geotiff now, and some cells have a not-expected value, so I want to
Interpolation them, and I notice that there is a command named r.fillnull,
however the cell to be changed is not null, so I want to :
1) change the special  cell value to null
2) use the r.fillnull to Interpolation.

The problem is I do not know how to do the step 1 with grass, anyone can do
me a favor?

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


[GRASS-user] Re: change the cell value of a geotiff

2010-01-20 Thread maven apache
2010/1/20 maven apache apachemav...@gmail.com

 Hi:
 I have a geotiff now, and some cells have a not-expected value, so I want
 to Interpolation them, and I notice that there is a command named
 r.fillnull, however the cell to be changed is not null, so I want to :
 1) change the special  cell value to null
 2) use the r.fillnull to Interpolation.

 The problem is I do not know how to do the step 1 with grass, anyone can do
 me a favor?

 Thanks.

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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread Milton Cezar Ribeiro
Hey someone, don't push..

r.mapcalc NewMap=if(OldMap==999,null(),OldMap)

bests

milton
2010/1/20 maven apache apachemav...@gmail.com

 Hi:
 I have a geotiff now, and some cells have a not-expected value, so I want
 to Interpolation them, and I notice that there is a command named
 r.fillnull, however the cell to be changed is not null, so I want to :
 1) change the special  cell value to null
 2) use the r.fillnull to Interpolation.

 The problem is I do not know how to do the step 1 with grass, anyone can do
 me a favor?

 Thanks.

 ___
 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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread maven apache
2010/1/20 Milton Cezar Ribeiro miltinho.astrona...@gmail.com

 Hey someone, don't push..

Sorry. I was worred.


 r.mapcalc NewMap=if(OldMap==999,null(),OldMap)


:(
I have seen the docs,but I am not sure the usage of it.

My raster map is aa in the grass, and the to be changed value is 12.1,I want
to change it to null,so can you build the commond for me ,:(
Thanks.


 bests

 milton
 2010/1/20 maven apache apachemav...@gmail.com

 Hi:

 I have a geotiff now, and some cells have a not-expected value, so I want
 to Interpolation them, and I notice that there is a command named
 r.fillnull, however the cell to be changed is not null, so I want to :
 1) change the special  cell value to null
 2) use the r.fillnull to Interpolation.

 The problem is I do not know how to do the step 1 with grass, anyone can
 do me a favor?

 Thanks.

 ___
 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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread Glynn Clements

maven apache wrote:

  r.mapcalc NewMap=if(OldMap==999,null(),OldMap)
 
 
 :(
 I have seen the docs,but I am not sure the usage of it.
 
 My raster map is aa in the grass, and the to be changed value is 12.1,I want
 to change it to null,so can you build the commond for me ,:(

r.mapcalc 'aa2 = if(abs(aa - 12.1)  1e-6, null(), aa)'

Or, to modify the map in-place:

r.null map=aa setnull=12.09-12.11

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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread Hamish
maven apache wrote:
 I have a geotiff now, and some cells have a not-expected
 value, so I want to Interpolation them, and I notice that
 there is a command named r.fillnull, however the cell to be
 changed is not null, so I want to :
 1) change the special  cell value to null
 
 2) use the r.fillnull to Interpolation.
 
 The problem is I do not know how to do the step 1 with
 grass, anyone can do me a favor?


try r.null.


Hamish




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


Re: [GRASS-user] Wxpython GUI in UBUNTU 9.10

2010-01-20 Thread Kim Besson
Hello

Ok my bad. I didn't have python-wxgtk2.8 installed.

ok Now it's working but I got another ERROR and I guess this one has nothing
to do with WXpython.
An error windows stating
*ERROR in command execution g.region*
Unable to get current geographic extent. Force quiting wxGUI. Please run
manually g.region to fix the problem.

When I press ok the window and GUI closes and it get back to TERMINAL.

Any tips of what is happening?

Kim







2010/1/19 Hamish hamis...@yahoo.com

  Kim Besson wrote:
   I'm a new user of GRASS and I have downloaded grass (6.4.0~rc5-2) for
  i386 architecture from http://packages.ubuntu.com/karmic/grass.
 
   as far as I can see GRASS by command line is working.
   Now the problem seems to be wxpython

 Micha wrote:
  Check if you have installed the package python-wxversion:
  mi...@rms:~$ dpkg -l | grep wxversion
  ii  python-wxversion2.8.10.1-0ubuntu1

 The 6.4 GRASS package there only Suggests python-wxgtk2.8 (which
 depends on python-wxversion), it isn't a mandatory requirement (tcl is).
 Maybe we should bump that up to recommends.

 you might have a look at the other optional packages at
   http://packages.ubuntu.com/karmic/grass
 and decide if you want to install them too.


 (sure, it could fail in a cleaner way too!)


 Hamish





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


[GRASS-user] Defining Minimum Mapping Units

2010-01-20 Thread Luis Lisboa
Greetings all

I've been reading a Remote Sensing classic Remote Sensing and Image
intepretation by Lillesand and Kiefer. :)
By Those guys Minimum Mapping Units are the smallest size areal entity to be
mapped as a discrete area.
They also state that: The size of a minimum area that can be mapped as any
particular land use/land cover class depends on the scale and resolution of
the satellite images.
Ok, now my situation :). I need to produce a few land cover maps, after
classification, with an aggregation of a defined minimum mapping unit(MMU)
for a scale of 1:5. As far as I can see, I would say that MMU would be
minumum size of a polygon that can be mapped. For istance what Would I have
to do to aggregate a classification map with a minimum area of 20 km^2?

Thanks

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


Re: [GRASS-user] Re: [Qgis-user] latitude map

2010-01-20 Thread A. Marcia BARBOSA
Thanks a lot you both.

I had actually thought of using r.to.vect to get a point map with all
the pixel centres, then v.to.db to get their coordinates etc., but the
maps are too large and resolution too high. Obviously r.mapcalc was
the solution I was looking for, I just regret not noticing it
before... And I'll never cease to be amazed at how many things
r.mapcalc can do.

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


Re: [GRASS-user] Searching Docs about 3D geological modelisation

2010-01-20 Thread Dylan Beaudette
Quick update:

I recently heard back from Graham Fogg here on campus, and he is in favor of 
allowing T-PROGS to be used within GRASS. However, he is still waiting for 
the final go-ahead from the original author.

Dylan

On Monday 11 January 2010, Thomas Adams wrote:
 Dylan,

 Can you tell me how to obtain TPROGS? Is it only available commercially?

 Thanks,
 Tom

 Dylan Beaudette wrote:
  Two more ideas:
 
  1. conditional simulation, based on a 3D variogram model
  2. transition probability-based interpolation of categories
 
  Check out gstat for the conditional simulation, and TPROGS for the
  transition probability. If anything is interested, I have done some
  programming to connect GRASS and TPROGS.
 
  Cheers!
 
  Dylan
 
  On Fri, Jan 8, 2010 at 1:24 PM, Benjamin Ducke
 
  benjamin.du...@oxfordarch.co.uk wrote:
  Woohoo, this forum is always a treasure trove
  of good advice. I had not idea SGemS existed!
  The Voronoi idea is also good, I am just not sure
  that the 3D Voronoi diagram is quite what one
  would instinctively think it is.
 
  http://en.wikipedia.org/wiki/Voronoi_diagram
 
  says: In general a cross section of a 3D Voronoi
  tessellation is not a 2D Voronoi tessellation itself.
 
  Need to look into that.
 
  I don't have much practical experience
  with Bayes models, so can't really comment on
  that.
 
  Cheers,
 
  Ben
 
  Christian Kaiser wrote:
  It seems to me that this is a 3D interpolation problem with categorical
  variables.
 
  Maybe the Bayesian Maximum Entropy approach could help. There are some
  interesting publications around also for geology and soil sciences, and
  they can deal with categorical data as well. Look for example here:
  http://www.enge.ucl.ac.be/staff/curr/Bogaert/biblioBME/BMEbibsubject.ht
 ml#Soil%20Science
 
  Or maybe you can have a look at SGeMS (http://sgems.sourceforge.net), a
  tool for 3D geostatistics.
 
  None of them is available through GRASS, but the algorithms are freely
  available (I think open-source, but not verified).
 
  I am not a geologist, so please forgive if it is not adequate...
 
  Christian Kaiser
 
  On 8 janv. 2010, at 11:04, Benjamin Ducke wrote:
  Rich Shepard wrote:
  material. There is no interpolation algorithm in GRASS currently
  which can
  handle that sort of data well.
 
   So what is needed is a political algorithm. :-)
 
  That's actually right: given the presence of n different
  layer types in the vicinity of an empty voxel, the algorithm
  would need to decide by some sort of majority vote
  which type to assign to that voxel.
 
   Kidding aside, I suspect that a fuzzy interpolation algorithm would
  solve the problem.
 
  How? You could make the interpolated value depend on a
  fuzzy set member function, I suppose, but the situation
  here is actually so well defined that I think a probabilistic
  approach would be preferable. Since each voxel can only
  store one value, a second output map could store the
  classification probability. That may be very useful
  for visualization (you could show voxels with little
  probability hazier).
 
  Ben
 
  Rich
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user
 
  --
  Benjamin Ducke
  Geospatial Consultant
 
  Oxford Archaeology Digital
  Janus House
  Osney Mead
  OX2 0ES
  Oxford, U.K.
 
  Tel: +44 (0)1865 263 800 (switchboard)
  Tel: +44 (0)1865 980 758 (direct)
  Fax :+44 (0)1865 793 496
  benjamin.du...@oadigital.net
  http://oadigital.net
 
 
 
 
 
  --
  Files attached to this email may be in ISO 26300 format (OASIS Open
  Document Format). If you have difficulty opening them, please visit
  http://iso26300.info for more information.
 
  ___
  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
 
  --
  Benjamin Ducke
  Geospatial Consultant
 
  Oxford Archaeology Digital
  Janus House
  Osney Mead
  OX2 0ES
  Oxford, U.K.
 
  Tel: +44 (0)1865 263 800 (switchboard)
  Tel: +44 (0)1865 980 758 (direct)
  Fax :+44 (0)1865 793 496
  benjamin.du...@oadigital.net
  http://oadigital.net
 
 
 
 
 
  --
  Files attached to this email may be in ISO 26300 format (OASIS Open
  Document Format). If you have difficulty opening them, please visit
  http://iso26300.info for more information.
 
  ___
  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



-- 
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University 

Re: [GRASS-user] Searching Docs about 3D geological modelisation

2010-01-20 Thread Benjamin Ducke
Hey, good news. Please keep us updated!

Ben

- Original Message -
From: Dylan Beaudette debeaude...@ucdavis.edu
To: Thomas Adams thomas.ad...@noaa.gov
Cc: grass list grass-user@lists.osgeo.org
Sent: Wednesday, January 20, 2010 8:10:45 PM GMT +01:00 Amsterdam / Berlin / 
Bern / Rome / Stockholm / Vienna
Subject: Re: [GRASS-user] Searching Docs about 3D geological modelisation

Quick update:

I recently heard back from Graham Fogg here on campus, and he is in favor of 
allowing T-PROGS to be used within GRASS. However, he is still waiting for 
the final go-ahead from the original author.

Dylan

On Monday 11 January 2010, Thomas Adams wrote:
 Dylan,

 Can you tell me how to obtain TPROGS? Is it only available commercially?

 Thanks,
 Tom

 Dylan Beaudette wrote:
  Two more ideas:
 
  1. conditional simulation, based on a 3D variogram model
  2. transition probability-based interpolation of categories
 
  Check out gstat for the conditional simulation, and TPROGS for the
  transition probability. If anything is interested, I have done some
  programming to connect GRASS and TPROGS.
 
  Cheers!
 
  Dylan
 
  On Fri, Jan 8, 2010 at 1:24 PM, Benjamin Ducke
 
  benjamin.du...@oxfordarch.co.uk wrote:
  Woohoo, this forum is always a treasure trove
  of good advice. I had not idea SGemS existed!
  The Voronoi idea is also good, I am just not sure
  that the 3D Voronoi diagram is quite what one
  would instinctively think it is.
 
  http://en.wikipedia.org/wiki/Voronoi_diagram
 
  says: In general a cross section of a 3D Voronoi
  tessellation is not a 2D Voronoi tessellation itself.
 
  Need to look into that.
 
  I don't have much practical experience
  with Bayes models, so can't really comment on
  that.
 
  Cheers,
 
  Ben
 
  Christian Kaiser wrote:
  It seems to me that this is a 3D interpolation problem with categorical
  variables.
 
  Maybe the Bayesian Maximum Entropy approach could help. There are some
  interesting publications around also for geology and soil sciences, and
  they can deal with categorical data as well. Look for example here:
  http://www.enge.ucl.ac.be/staff/curr/Bogaert/biblioBME/BMEbibsubject.ht
 ml#Soil%20Science
 
  Or maybe you can have a look at SGeMS (http://sgems.sourceforge.net), a
  tool for 3D geostatistics.
 
  None of them is available through GRASS, but the algorithms are freely
  available (I think open-source, but not verified).
 
  I am not a geologist, so please forgive if it is not adequate...
 
  Christian Kaiser
 
  On 8 janv. 2010, at 11:04, Benjamin Ducke wrote:
  Rich Shepard wrote:
  material. There is no interpolation algorithm in GRASS currently
  which can
  handle that sort of data well.
 
   So what is needed is a political algorithm. :-)
 
  That's actually right: given the presence of n different
  layer types in the vicinity of an empty voxel, the algorithm
  would need to decide by some sort of majority vote
  which type to assign to that voxel.
 
   Kidding aside, I suspect that a fuzzy interpolation algorithm would
  solve the problem.
 
  How? You could make the interpolated value depend on a
  fuzzy set member function, I suppose, but the situation
  here is actually so well defined that I think a probabilistic
  approach would be preferable. Since each voxel can only
  store one value, a second output map could store the
  classification probability. That may be very useful
  for visualization (you could show voxels with little
  probability hazier).
 
  Ben
 
  Rich
  ___
  grass-user mailing list
  grass-user@lists.osgeo.org
  http://lists.osgeo.org/mailman/listinfo/grass-user
 
  --
  Benjamin Ducke
  Geospatial Consultant
 
  Oxford Archaeology Digital
  Janus House
  Osney Mead
  OX2 0ES
  Oxford, U.K.
 
  Tel: +44 (0)1865 263 800 (switchboard)
  Tel: +44 (0)1865 980 758 (direct)
  Fax :+44 (0)1865 793 496
  benjamin.du...@oadigital.net
  http://oadigital.net
 
 
 
 
 
  --
  Files attached to this email may be in ISO 26300 format (OASIS Open
  Document Format). If you have difficulty opening them, please visit
  http://iso26300.info for more information.
 
  ___
  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
 
  --
  Benjamin Ducke
  Geospatial Consultant
 
  Oxford Archaeology Digital
  Janus House
  Osney Mead
  OX2 0ES
  Oxford, U.K.
 
  Tel: +44 (0)1865 263 800 (switchboard)
  Tel: +44 (0)1865 980 758 (direct)
  Fax :+44 (0)1865 793 496
  benjamin.du...@oadigital.net
  http://oadigital.net
 
 
 
 
 
  --
  Files attached to this email may be in ISO 26300 format (OASIS Open
  Document Format). If you have difficulty opening them, please visit
  http://iso26300.info for more information.
 
  

Re: [GRASS-user] Wxpython GUI in UBUNTU 9.10

2010-01-20 Thread Hamish
Kim wrote:
 ok Now it's working
 but I got another ERROR and I guess this one has nothing to
 do with WXpython.
 An error windows stating

 ERROR in command
 execution g.region
 Unable to get current geographic extent. Force quiting wxGUI.
 Please run manually g.region to fix the problem.
 
 When I press ok the window and GUI closes and it get back to
 TERMINAL.
 
 Any tips of what is
 happening?

can you start up in text mode ('grass64 -text', then esc-enter)
and run 'g.region -p' from the command line?

(typically this error means a mis-match in the GDAL install
version, but you have to run g.region from the command line
to see the real error message  find out. [devs: why can't the
GUI propgate the g.region error message for us?])


Hamish



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


Re: [GRASS-user] r.patch: GRASS-6.5svn

2010-01-20 Thread Rich Shepard

On Fri, 15 Jan 2010, Rich Shepard wrote:


 I need ideas on how to find the source of the problem. What might cause
such an error?


  Does anyone know why r.patch and/or r.series would generate an error about
not being able to write a row when maps are concatenated? It seems to me
that if the data are good (which they seem to be), and I can combine the two
suspect maps (of the 9 total) with surrounding ones one at a time until a
threshold is reached, it must be something with the two modules that's
failing.

  I'd really like to fix this so I can get the DEM for the entire state
before I try for other states.

Thanks,

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


Re: [GRASS-user] Defining Minimum Mapping Units

2010-01-20 Thread Markus Neteler
On Wed, Jan 20, 2010 at 7:03 PM, Luis Lisboa luislisboa1...@gmail.com wrote:
 Greetings all
 I've been reading a Remote Sensing classic Remote Sensing and Image
 intepretation by Lillesand and Kiefer. :)
 By Those guys Minimum Mapping Units are the smallest size areal entity to be
 mapped as a discrete area.
 They also state that: The size of a minimum area that can be mapped as any
 particular land use/land cover class depends on the scale and resolution of
 the satellite images.
 Ok, now my situation :). I need to produce a few land cover maps, after
 classification, with an aggregation of a defined minimum mapping unit(MMU)
 for a scale of 1:5. As far as I can see, I would say that MMU would be
 minumum size of a polygon that can be mapped. For istance what Would I have
 to do to aggregate a classification map with a minimum area of 20 km^2?

Quick answer without thinking too much:
- r.reclass.area: Reclasses a raster map greater or less than user
specified area size (in hectares).
or
- v.clean, tool rmarea: remove small areas, the longest boundary with
adjacent area is removed

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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread maven apache
2010/1/21 Hamish hamis...@yahoo.com

 maven apache wrote:
  I have a geotiff now, and some cells have a not-expected
  value, so I want to Interpolation them, and I notice that
  there is a command named r.fillnull, however the cell to be
  changed is not null, so I want to :
  1) change the special  cell value to null
 
  2) use the r.fillnull to Interpolation.
 
  The problem is I do not know how to do the step 1 with
  grass, anyone can do me a favor?


 try r.null.


 Hamish



 Hi;
It seems that the r.null does not work.

1) I use the r.info to get the info of the tiff which I have imported to
grass and I got that:
Hi:

(Thu Jan 21 09:56:46
2010)
r.info map=...@permanent

 ++
 | Layer:a...@permanent  Date: Tue Jan 12 16:02:39
2010|
 | Mapset:   PERMANENT  Login of Creator:
Administrator   |
 | Location:
hdf5loc  |
 | DataBase:
D:\GrassDataBase |
 | Title: ( aaa
) |
 | Timestamp:
none|
 ||
 |
|
 |   Type of Map:  raster   Number of Categories:
499 |
 |   Data Type:
FCELL  |
 |   Rows:
720|
 |   Columns:
1440   |
 |   Total Cells:
1036800|
 |Projection:
Latitude-Longitude  |
 |N:90NS:90S   Res:
0:15 |
 |E:   180EW:   180W   Res:
0:15 |
 |   Range of data:min = -1267650600228229401496703205376.00  max =
4 |
 |
|
 |   Data
Description:|
 |generated by
r.in.gdal  |
 |
|
 |
Comments:|
 |r.in.gdal input=D:\data\hdf5\aaa.tif
output=aaa |
 |
|
 ++
(Thu Jan 21 09:56:47 2010) Command finished (0
sec)
(Thu Jan 21 09:56:50 2010)


2)then I use r.null to set the null value to null:   r.null
setnull=-1.26765060022823e+030


3) I use the r.info again to see if it is changed :
r.info -r map=...@permanent

min=-1.26765060022823e+030
max=498.5
(Thu Jan 21 09:56:50 2010) Command finished (0
sec)

It seems that the valuse are  not changed to null.

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


[GRASS-user] Fwd: A quick call for help - FOSS and Haiti

2010-01-20 Thread Hamish
fyi for the Open Layers experts reading, and others..   --H
--


From: Gavin Treadgold gt at kestrel.co.nz
Subject: A quick call for help - FOSS and Haiti
Date: Thu, Jan 21, 2010 at 2:32 PM


This is a brief request from the Sahana Software Foundation to fellow
GSOC mentors and their projects. We have already approached some
communities with requests for assistance, and I thought I'd ask here.

We are looking for additional developers to help us with Sahana and
continue to build an information portal that is seeing increased interest
and usage to assist organisations responding to events in Haiti.

Sahana Haiti Reponse Overview page + areas we're working on
http://wiki.sahana.lk/doku.php/haiti:start

Skills we are primarily looking for (you don't need them all, any will
do):
 * Python - the main development for SahanaPy is Python (we're not using
PHP for this instance)
 * web2py - we use the web2py enterprise framework for SahanaPy (I'm told
it is fairly easy to learn if you're used to Django)
 * OpenLayers
 * jQuery

Best place is to jump onto #sahana on freenode if you're interested in
giving us a hand or finding out more. As much or as little as you want.
Some of our core devs have been working really long hours the past 5-6
days, and any additional resource would assist us greatly, particularly
as we're really starting to get some interest, traction and coverage. And
more feature requests.

If you read this far, thanks for taking the brief time required to read
this - hope some of you are able to join us on #sahana and help out in
whatever way possible ;)

Cheers Gavin

2008 GSOC Admin, 2009 GSOC Mentor
Board Member, Sahana Software Foundation
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread Hamish
maven wrote:
 I have a geotiff now, and some cells have a
 not-expected value, so I want to Interpolation them, and I notice
 that there is a command named r.fillnull, however the cell
 to be changed is not null, so I want to :

Hamish:
  try r.null.


  |   Range of data:min =
 -1267650600228229401496703205376.00  max = 4 |


 2)then I use r.null to set the null value to null:  
 r.null setnull=-1.26765060022823e+030

 3) I use the r.info again to see if it is changed :
 
 r.info -r map=...@permanent

 min=-1.26765060022823e+030
 max=498.5
..
  It seems that the valuse are  not changed to
 null.
 
 I wonder why?

probably due to floating point precision issues (why Glynn recommended
to use a range instead of an exact value, see
  http://docs.sun.com/source/806-3568/ncg_goldberg.html  )


So going back to the r.mapcalc method, except use less-than some minimum
value instead of trying to do an exact equality:


r.mapcalc clean_map = if( dirty_map  -, null(), dirty_map)


meaning:
 if (this is true), then (set it to this), otherwise (set it to this)




Hamish



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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread Milton Cezar Ribeiro
Hi Maven,

do you think that if you have min = -1267650600228229401496703205376.00
is the same value you used on  r.null setnull=-1.26765060022823e+030 ?

I think following the Hamish's suggestion you will get there :-)

bests

milton



2010/1/20 maven apache apachemav...@gmail.com



 2010/1/21 Hamish hamis...@yahoo.com

   maven apache wrote:
  I have a geotiff now, and some cells have a not-expected
  value, so I want to Interpolation them, and I notice that
  there is a command named r.fillnull, however the cell to be
  changed is not null, so I want to :
  1) change the special  cell value to null
 
  2) use the r.fillnull to Interpolation.
 
  The problem is I do not know how to do the step 1 with
  grass, anyone can do me a favor?


 try r.null.


 Hamish



 Hi;
 It seems that the r.null does not work.

 1) I use the r.info to get the info of the tiff which I have imported to
 grass and I got that:
 Hi:

 (Thu Jan 21 09:56:46
 2010)
 r.info map=...@permanent


  
 ++
  | Layer:a...@permanent  Date: Tue Jan 12 16:02:39
 2010|
  | Mapset:   PERMANENT  Login of Creator:
 Administrator   |
  | Location:
 hdf5loc  |
  | DataBase:
 D:\GrassDataBase |
  | Title: ( aaa
 ) |
  | Timestamp:
 none|

  
 ||
  |
 |
  |   Type of Map:  raster   Number of Categories:
 499 |
  |   Data Type:
 FCELL  |
  |   Rows:
 720|
  |   Columns:
 1440   |
  |   Total Cells:
 1036800|
  |Projection:
 Latitude-Longitude  |
  |N:90NS:90S   Res:
 0:15 |
  |E:   180EW:   180W   Res:
 0:15 |
  |   Range of data:min = -1267650600228229401496703205376.00  max =
 4 |
  |
 |
  |   Data
 Description:|
  |generated by
 r.in.gdal  |
  |
 |
  |
 Comments:|
  |r.in.gdal input=D:\data\hdf5\aaa.tif
 output=aaa |
  |
 |

  
 ++
 (Thu Jan 21 09:56:47 2010) Command finished (0
 sec)
 (Thu Jan 21 09:56:50 2010)


 2)then I use r.null to set the null value to null:   r.null
 setnull=-1.26765060022823e+030


 3) I use the r.info again to see if it is changed :
 r.info -r map=...@permanent

 min=-1.26765060022823e+030
 max=498.5
 (Thu Jan 21 09:56:50 2010) Command finished (0
 sec)

 It seems that the valuse are  not changed to null.

 I wonder why?

 ___
 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


Re: [GRASS-user] change the cell value of a geotiff

2010-01-20 Thread maven apache
2010/1/21 Milton Cezar Ribeiro miltinho.astrona...@gmail.com

 Hi Maven,

 do you think that if you have min = -1267650600228229401496703205376.00
 is the same value you used on  r.null setnull=-1.26765060022823e+030 ?

Oh ,thanks ,my mistake.
I used the  r.null map=...@permanent setnull=-1.267e+30--1.268e+30 
it seems that it works. And now I am using the r.fillnulls to do the
Interpolation, it has taken a long time. :(

IS the tension and smooth parameter shoudle be configed?


 I think following the Hamish's suggestion you will get there :-)

 bests

 milton



 2010/1/20 maven apache apachemav...@gmail.com



 2010/1/21 Hamish hamis...@yahoo.com

   maven apache wrote:
  I have a geotiff now, and some cells have a not-expected
  value, so I want to Interpolation them, and I notice that
  there is a command named r.fillnull, however the cell to be
  changed is not null, so I want to :
  1) change the special  cell value to null
 
  2) use the r.fillnull to Interpolation.
 
  The problem is I do not know how to do the step 1 with
  grass, anyone can do me a favor?


 try r.null.


 Hamish



 Hi;
 It seems that the r.null does not work.

 1) I use the r.info to get the info of the tiff which I have imported to
 grass and I got that:
 Hi:

 (Thu Jan 21 09:56:46
 2010)
 r.info map=...@permanent


  
 ++
  | Layer:a...@permanent  Date: Tue Jan 12 16:02:39
 2010|
  | Mapset:   PERMANENT  Login of Creator:
 Administrator   |
  | Location:
 hdf5loc  |
  | DataBase:
 D:\GrassDataBase |
  | Title: ( aaa
 ) |
  | Timestamp:
 none|

  
 ||
  |
 |
  |   Type of Map:  raster   Number of Categories:
 499 |
  |   Data Type:
 FCELL  |
  |   Rows:
 720|
  |   Columns:
 1440   |
  |   Total Cells:
 1036800|
  |Projection:
 Latitude-Longitude  |
  |N:90NS:90S   Res:
 0:15 |
  |E:   180EW:   180W   Res:
 0:15 |
  |   Range of data:min = -1267650600228229401496703205376.00  max
 = 4 |
  |
 |
  |   Data
 Description:|
  |generated by
 r.in.gdal  |
  |
 |
  |
 Comments:|
  |r.in.gdal input=D:\data\hdf5\aaa.tif
 output=aaa |
  |
 |

  
 ++
 (Thu Jan 21 09:56:47 2010) Command finished (0
 sec)
 (Thu Jan 21 09:56:50 2010)


 2)then I use r.null to set the null value to null:   r.null
 setnull=-1.26765060022823e+030


 3) I use the r.info again to see if it is changed :
 r.info -r map=...@permanent

 min=-1.26765060022823e+030
 max=498.5
 (Thu Jan 21 09:56:50 2010) Command finished (0
 sec)

 It seems that the valuse are  not changed to null.

 I wonder why?

 ___
 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


Re: [GRASS-user] r.patch: GRASS-6.5svn

2010-01-20 Thread Glynn Clements

Rich Shepard wrote:

   I need ideas on how to find the source of the problem. What might cause
  such an error?
 
Does anyone know why r.patch and/or r.series would generate an error about
 not being able to write a row when maps are concatenated? It seems to me
 that if the data are good (which they seem to be), and I can combine the two
 suspect maps (of the 9 total) with surrounding ones one at a time until a
 threshold is reached, it must be something with the two modules that's
 failing.

The error map [%s] - unable to write row %d doesn't originate in a
module, it originates in the library, and invariably indicates that
write() failed.

[If you're getting a different error, please post the *exact* error
message, not a paraphrase.]

This can be caused by many things, including (but not limited to):

* Exceeding the 2GiB limit on a build without LFS.
* Exceeding the 4GiB limit of a FAT filesystem.
* Exceeding ulimit -f.
* Exceeding quota.
* Disk full.
* Hardware error

If you built GRASS from source, apply the attached patch with:

patch -p0  write_errno.patch

from the top-level directory of the GRASS source tree, then
re-compile.

This will cause the underlying OS error to be included in the error
message.

The issue isn't limited to a specific module. I would expect to see
the same issue with almost any raster command run with the same
region, e.g.:

r.mapcalc 'test = rand(-1.0,1.0)'

Note: I wouldn't expect to see the issue with a trivial test case such
as:

r.mapcalc 'test = 0'

because such a map will compress very well, and it's the size of the
compressed data which matters.

-- 
Glynn Clements gl...@gclements.plus.com

Index: lib/gis/put_row.c
===
--- lib/gis/put_row.c   (revision 40542)
+++ lib/gis/put_row.c   (working copy)
@@ -122,6 +122,7 @@
  **/
 
 #include string.h
+#include errno.h
 
 #include sys/types.h
 #include sys/stat.h
@@ -307,7 +308,8 @@
 if (fcb-io_error)
return;
 
-G_warning(_(map [%s] - unable to write row %d), fcb-name, row);
+G_warning(_(map [%s] - unable to write row %d (%s)), fcb-name, row,
+ strerror(errno));
 
 fcb-io_error = 1;
 
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] how to know if LFS flag is enable

2010-01-20 Thread Milton Cezar Ribeiro
Hi Glynn, sorry my delay on answer.

So under windows we are really limitted to 2Gb
independent of compile using LFS flag? :-(
Are there plans to by pass this!?
I hope windows users could also be favoured
of GRASS for work with large maps on near future.

bests

milton

2010/1/19 Glynn Clements gl...@gclements.plus.com


 Milton Cezar Ribeiro wrote:

  I am using r.series to join several large raster maps, but
  the south part of my map is completely empty, and
  whem I try r.what I get a error message can't read.
 
  I was wondering if it is a problem with LFS (large file system)
  flag. I compiled grass 6.4.0svn two weeks ago using
  OSGeo4W/Msys under Vista, in a dell/64bit computer with
  6G ram. Any help are welcome.

 LFS currently doesn't work on Windows.

 --
 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] Re: compiling grass 64bit under vista?

2010-01-20 Thread Milton Cezar Ribeiro
Dear Helmut and Markus

I checked out the Helmut's suggestion, and in fact are there a MinGW-w64
that is a mix between 32-64b. I think it is a very promising solution for
windows-based users, mainly because many of new computers that we buy for
GIS end-users area, in general, with large memory (4Gb+) and 64bit.

But as Helmut advice, I can get in trouble if we mix 32  64b.
Addictionally, I have no idea of how many users compile grass from source
under MSYS/Windows using the easy-to-follow and valuable intructions found
at http://trac.osgeo.org/grass/wiki/CompileOnWindows
I think rare people will be able to bypass the difficulties of try compile
grass under windows using other configurations/libs different from the
instructions above. So, if someone feel confortable to try, and could
prepare a *CompileOnWindowsW64 *it will be great.

By the way, the new python-based grass7 will still have the same limitations
under windows (not use LFS and only run as 32b)?

bests

niltinho
2010/1/19 Helmut Kudrnovsky hel...@web.de

 hi,

 Dear all,
 
 I have used grass under Vista, and compiled it using
 Msys/OSgeo4W version. If I am not wrong I will get only
 a 32bit grass, because Msys/gcc and some of libs downloadable
 from the links http://trac.osgeo.org/grass/wiki/CompileOnWindows
 deal with 32bit instead 64.
 
 Is there a way of I prepare and environment under Vista to
 compile it with 64b? May be someone could help
 to preparar a *CompileOnWindows64* :-)
 
 Any hint are welcome.

 there seems to be a working mingw64-environment:

 http://sourceforge.net/projects/mingw-w64/

 The mingw-w64 project is a complete runtime environment for gcc to support
 binaries native to Windows 64-bit and 32-bit operating systems. 

 maybe mixing 32bit-dependecies from osgeo4w and 64bit GRASS isn't a very
 good idea,
 so maybe it would be necessary to build a new 64bit building environment
 with mingw64
 and 64bit dependecies like gdal, proj, tcltk, etc.

 but it would be a nice idea ... :o)

 best regards
 Helmut

 ___
 Preisknaller: WEB.DE http://web.de/ DSL Flatrate für nur 16,99
 Euro/mtl.!
 http://produkte.web.de/go/02/


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