[GRASS-user] More maps with same legend (for visually compare)
Dear GRASS-User List, I have a CSV file with X,Y,Z coords of 150 point in a time series (50 measuring). I imported it in a for cycle of $i (1..50): v.in.ascii input=su1_data.csv output=su1_v_$i format=point fs=';' skip=2 x=2 y=3 z=$iplus4 cat=0 --overwrite and made surface with: v.surf.rst input=su1_v_$i layer=1 dmax=25 dmin=5 zmult=1 tension=40 segmax=200 npmin=100 zcolumn=dbl_$i elev=su1_v_surf_rst_$i --overwrite I displayed the maps with: d.erase d.rast su1_v_surf_rst_$i d.legend map=su1_v_surf_rst_$i and would like compare it visually. The problem is, that the scaling and coloring of surfaces is different by each map. Is it possible to set with a parameter of v.surf.rst that all maps legend should have use the legend with the same highest and deepest point? I don't find so a parameter. Is there another solution to visualize the time series? If somebody have the time to run it, the full script is here: http://born.try.hu/grass/su1.sh And the data file is here: http://born.try.hu/grass/su1_data.csv Thanks for all help: Imre Bornemisza --- Bornemisza Imre . [EMAIL PROTECTED] . +36 30 288 24 64 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] More maps with same legend (for visually compare)
On 07/11/08 15:06, Bornemisza Imre wrote: Dear GRASS-User List, I have a CSV file with X,Y,Z coords of 150 point in a time series (50 measuring). I imported it in a for cycle of $i (1..50): v.in.ascii input=su1_data.csv output=su1_v_$i format=point fs=';' skip=2 x=2 y=3 z=$iplus4 cat=0 --overwrite and made surface with: v.surf.rst input=su1_v_$i layer=1 dmax=25 dmin=5 zmult=1 tension=40 segmax=200 npmin=100 zcolumn=dbl_$i elev=su1_v_surf_rst_$i --overwrite I displayed the maps with: d.erase d.rast su1_v_surf_rst_$i d.legend map=su1_v_surf_rst_$i and would like compare it visually. The problem is, that the scaling and coloring of surfaces is different by each map. Is it possible to set with a parameter of v.surf.rst that all maps legend should have use the legend with the same highest and deepest point? I don't find so a parameter. Is there another solut ion to visualize the time series? This is not a v.surf.rst issue, but a r.colors issues. You can either create a customized color table in a file and use r.colors rules= to apply these rules to all your maps, or, if you have one raster map which is the reference map, you can also use r.colors raster= Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] More maps with same legend (for visually compare)
On Fri, Nov 7, 2008 at 3:18 PM, Moritz Lennert [EMAIL PROTECTED] wrote: On 07/11/08 15:06, Bornemisza Imre wrote: Dear GRASS-User List, I have a CSV file with X,Y,Z coords of 150 point in a time series (50 measuring). I imported it in a for cycle of $i (1..50): v.in.ascii input=su1_data.csv output=su1_v_$i format=point fs=';' skip=2 x=2 y=3 z=$iplus4 cat=0 --overwrite and made surface with: v.surf.rst input=su1_v_$i layer=1 dmax=25 dmin=5 zmult=1 tension=40 segmax=200 npmin=100 zcolumn=dbl_$i elev=su1_v_surf_rst_$i --overwrite I displayed the maps with: d.erase d.rast su1_v_surf_rst_$i d.legend map=su1_v_surf_rst_$i and would like compare it visually. The problem is, that the scaling and coloring of surfaces is different by each map. Is it possible to set with a parameter of v.surf.rst that all maps legend should have use the legend with the same highest and deepest point? I don't find so a parameter. Is there another solut ion to visualize the time series? This is not a v.surf.rst issue, but a r.colors issues. You can either create a customized color table in a file and use r.colors rules= to apply these rules to all your maps, or, if you have one raster map which is the reference map, you can also use r.colors raster= Just as a note, I have recently added a rast parameter to d.rast.leg: Parameters: rast Name of raster map to generate legend from Of course this reference raster map should have a range covering all maps in question. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] i.pca vs. r.covar/m.eigensystem/r.mapcalc
On Wed, 2008-11-05 at 07:06 -0800, Dylan Beaudette wrote: # trying with R x - readRAST6(c('b2','b6','b7')) x.pca - prcomp([EMAIL PROTECTED]) Error in svd(x, nu = 0) : infinite or missing values in 'x' ## again the same error! I'll try another time again. Kind regards, Nikos Sounds like NAs are getting in the way. This is a limitation of several R functions, that becomes particularly annoying when working with GIS data. Here are some tips on dealing with NA in GIS data: http://casoilresource.lawr.ucdavis.edu/drupal/node/664 Cheers, Dylan Dylan, great info!!! I've bombed in another wall :-( x.nas - which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b07)) Error in which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) : trying to get slot MOD2007_242_500_sur_refl_b02 from an object (class data.frame) that is not an S4 object I am working on it. Maybe something relevant with this error in [1] [1] https://stat.ethz.ch/pipermail/r-devel/2007-December/047743.html ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] i.pca vs. r.covar/m.eigensystem/r.mapcalc
On Friday 07 November 2008, Nikos Alexandris wrote: On Wed, 2008-11-05 at 07:06 -0800, Dylan Beaudette wrote: # trying with R x - readRAST6(c('b2','b6','b7')) x.pca - prcomp([EMAIL PROTECTED]) Error in svd(x, nu = 0) : infinite or missing values in 'x' ## again the same error! I'll try another time again. Kind regards, Nikos Sounds like NAs are getting in the way. This is a limitation of several R functions, that becomes particularly annoying when working with GIS data. Here are some tips on dealing with NA in GIS data: http://casoilresource.lawr.ucdavis.edu/drupal/node/664 Cheers, Dylan Dylan, great info!!! I've bombed in another wall :-( x.nas - which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b07)) Error in which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) : trying to get slot MOD2007_242_500_sur_refl_b02 from an object (class data.frame) that is not an S4 object I am working on it. Maybe something relevant with this error in [1] [1] https://stat.ethz.ch/pipermail/r-devel/2007-December/047743.html You have a syntax error here: [EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06 should be: [EMAIL PROTECTED] subtle but important. $ is used to access columns from a dataframe @ is used to access slots Cheers, Dylan -- Dylan Beaudette Soil Resource Laboratory http://casoilresource.lawr.ucdavis.edu/ University of California at Davis 530.754.7341 ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Rename multiple sqlite columns at once
On Fri, 2008-11-07 at 06:39 +, Glynn Clements wrote: Moritz Lennert wrote: [...] You still use quotes: tempcolumn=$tempcolumn\_tmp IIUC, the quotes will let the slash appear literally. So, just leave out the quotes as follows: tempcolumn=$tempcolumn\_tmp If you just want to prevent the underscore from being treated as part of the variable name, use braces: tempcolumn=${tempcolumn}_tmp or, if the variable's value may contain spaces:: tempcolumn=${tempcolumn}_tmp Thanks Glynn. I suppose this way it's safer. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] inner and outer buffer for a boundary
Martin: is there any reason why v.buffer should ignore features without category. At least warning should be printed out. It is a common feature across many vector modules. They often are written to loop through features selected by cat numbers. I do not say if this is good nor bad, just that it is. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] i.pca vs. r.covar/m.eigensystem/r.mapcalc
On Fri, 2008-11-07 at 09:54 -0800, Dylan Beaudette wrote: On Friday 07 November 2008, Nikos Alexandris wrote: On Wed, 2008-11-05 at 07:06 -0800, Dylan Beaudette wrote: [...] I've bombed in another wall :-( x.nas - which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b07)) Error in which(is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b02) is.na([EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06) : trying to get slot MOD2007_242_500_sur_refl_b02 from an object (class data.frame) that is not an S4 object [...] You have a syntax error here: [EMAIL PROTECTED]@MOD2007_242_500_sur_refl_b06 should be: [EMAIL PROTECTED] subtle but important. $ is used to access columns from a dataframe @ is used to access slots Cheers, Dylan Dylan, thank you. It works now... sort of!? Sorry for another long post. Perhaps I should continue this thread in another ML. #read raster maps x - readRAST6(c('MOD2007_242_500_sur_refl_b02','MOD2007_242_500_sur_refl_b06','MOD2007_242_500_sur_refl_b07')) #extract NAs x.nas - which(is.na([EMAIL PROTECTED]) is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b06) is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b07)) #vectors pointing to no-NAs x.vals - which( !is.na([EMAIL PROTECTED]) ! is.na([EMAIL PROTECTED]) !is.na([EMAIL PROTECTED] $MOD2007_242_500_sur_refl_b07)) #get no-NAs x.no.na - [EMAIL PROTECTED], ] #pca x.pca - prcomp(x.no.na) # output x.pca Standard deviations: [1] 881.8701 438.7193 108.9755 Rotation: PC1 PC2PC3 MOD2007_242_500_sur_refl_b02 0.4371624 0.83100302 -0.3439811 MOD2007_242_500_sur_refl_b06 0.7210191 -0.09520195 0.6863440 MOD2007_242_500_sur_refl_b07 0.5376063 -0.54806074 -0.6407877 # probably the correct function to use (and compare) is the princomp and not prcomp ## read [1] [2] for details # princomp on x.no.na ## now I am stuck here :-) x.pca_corr - princomp(x.no.na, cor = TRUE) # x.pca_corr Call: princomp(x = x.no.na, cor = TRUE) Standard deviations: Comp.1Comp.2Comp.3 1.5137012 0.8211861 0.1853699 3 variables and 88101 observations. # or cor = FALSE x.pca_cova - princomp(x.no.na, cor = FALSE) # x.pca_cova Call: princomp(x = x.no.na, cor = FALSE) Standard deviations: Comp.1 Comp.2 Comp.3 881.8651 438.7169 108.9748 3 variables and 88101 observations. # I would like to compare R's results with i.pca's but I don't know why or how I can control the print-out of the eigenvalues ## If I get the eigenvalues I would... #compare with i.pca reported eigenvalues## read first mails on this thread :-) Eigen values: ( -0.64 -0.65 -0.42 ) ( -0.71 0.28 0.64 ) ( -0.30 0.71 -0.64 ) My understanding is that i.pca reports in rows, so in mt exampl it is: pc1 ( -0.64 -0.65 -0.42 ) pc2 ( -0.71 0.28 0.64 ) pc3 ( -0.30 0.71 -0.64 ) Some interesting stuff to check: 1. prcomp and princomp accept an argument na.action a function which indicates what should happen when the data contain 'NA's. The default is set by the 'na.action' setting of 'options', and is 'na.fail' if that is unset. The 'factory-fresh' default is 'na.omit'. ## question: (something like na.action = na.omit would help?) --- [1] taken from ?prcomp: The calculation is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using 'eigen' on the covariance matrix. This is generally the preferred method for numerical accuracy. The 'print' method for these objects prints the results in a nice format and the 'plot' method produces a scree plot. [2] ?princomp: The calculation is done using 'eigen' on the correlation or covariance matrix, as determined by 'cor'. This is done for compatibility with the S-PLUS result. A preferred method of calculation is to use 'svd' on 'x', as is done in 'prcomp'. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Construction in grass
Hallo, could anyone give me a hint how to construct in grass on the best way? I want to draw dams in an drainage stream system , they have to have especial withs and heights. How to construct the streams the best way?Than I want to calculate the amount of material what is to move there to build the dams from natural material of that area. Possible to export as .dxf and work in qcad? Could someone gives me some links in the net? Thank You -- Chatterreichbarkeit: [EMAIL PROTECTED] ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.in.ascii howto
Hi, How should one import an ASCII file which begins with: --cut here---start- ORGANIZATION: DIGIT DATE: DIGIT NAME: MAP NAME: MAP DATE: MAP SCALE: 1 OTHER INFO: ZONE: 0 WEST EDGE: -360.00 EAST EDGE: 360.00 SOUTH EDGE: -90.00 NORTH EDGE: 90.00 MAP THRESH: 0.0001 VERTI: L 1435084 2 XXX.XX XX.XX .. . --cut here---end--- Essentially example 1a in the man page for v.in.ascii, which unfortunately doesn't have a command to show how this should be imported. Any advice would be appreciated. Thanks. Cheers, -- Seb ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: v.in.ascii howto
Never mind, I was misunderstanding that the standard mode in the man page is actually the standard format, so passing format=standard is what's needed in this case. On Fri, 07 Nov 2008 22:30:37 -0600, Sebastian P. Luque [EMAIL PROTECTED] wrote: Hi, How should one import an ASCII file which begins with: ORGANIZATION: DIGIT DATE: DIGIT NAME: MAP NAME: MAP DATE: MAP SCALE: 1 OTHER INFO: ZONE: 0 WEST EDGE: -360.00 EAST EDGE: 360.00 SOUTH EDGE: -90.00 NORTH EDGE: 90.00 MAP THRESH: 0.0001 VERTI: L 1435084 2 XXX.XX XX.XX .. . Essentially example 1a in the man page for v.in.ascii, which unfortunately doesn't have a command to show how this should be imported. Any advice would be appreciated. Thanks. -- Seb ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user