Re: [GRASS-user] Two questions - vector data and Mac install
Moritz Lennert wrote: On 25/06/08 02:46, Richard Chirgwin wrote: Hi all, 1) v.overlay question I have three maps: two area vectors (A and B), and a v.overlay result (C). Is there a simple way to assign the percentage of areas in (A) covered by the overlay (C)? Vector solution: http://lists.osgeo.org/pipermail/grass-user/2008-June/045290.html Moritz Moritz, This led me straight into an oddity. One of my vectors is created by buffering around points. The source map was a set of 800 points. V.buffer runs successfully, and when it ends, the new areas display without problem. However, when I run v.db.addtable, there are only 18 categories - any ideas? Richard ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
Martina > Yes, I need the lat/lon files only to print some maps for somebody > and I'm doing (or at least trying) to do my analysis on the > UTM files. note you can overlay a lat/lon grid in the UTM projection with d.grid -g or -w, or ps.map's geogrid instruction. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
Martina: > For the grid I'm fine now, my error was that the units for > the gridlines are not in degrees, but in rad or something like that. no, they really are in degrees. Like DDD:MM:SS.SSS. So for a 2' grid you'd do 'size=0:02', for a 1deg grid size=1, etc. > But my graph is twice much larger than I expected it (and > looks quite ugly), are you working at a high latitude? > but probably it's due to the fact that Grass > takes the same distance for 1degree in NS and EW in LongLat. for the display window it uses "Plate Carrée" projection, ie equi-rectangular. As for "same distance" that isn't quite right to say it is the same, e.g. d.measure will give a correct result and the "back end" is doing the right thing even if it looks funny in the display. 3D Earth -> 2D raster array/paper ... why map projections were invented. I suggest you reproject your data into a meter-based coordinate system appropriate for your region of study. > It seams also impossible to draw a North arrow and a scale > in LongLat. Newer versions of GRASS let you draw the north arrow with d.barscale in a lat/lon location. A scalebar is wrong/impossible in lat/lon as the scale changes with latitude, so just use d.grid there. Also you can add a north arrow with d.graph and the north arrow or compass symbols. http://grass.osgeo.org/wiki/IconSymbols Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Is the SRTM dataset a DEM or a DSM?
IMO its a DEM, since the "z" value represents elevation, including tree canopy and urban features. I personally don't like the term DSM because it can be related with any kind of Surface, and DEM (and DTM, when the "z" values represent the altitude) is related with the _topographical_ surface. cheers Carlos On Wed, Jun 25, 2008 at 15:31, Nikos Alexandris <[EMAIL PROTECTED]> wrote: > In http://srtm.csi.cgiar.org/SRTMdataProcessingMethodology.asp it's > called only DEM. In some papers it's called DSM. > > I'd rather say it's a DSM. But I would also like to know if there are > objections ;-) > > Thank you, > > Nikos > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > -- +---+ Carlos Henrique Grohmann - Guano Geologist M.Sc - Doctorate Student at IGc-USP - Brazil Linux User #89721 - carlos dot grohmann at gmail dot com +---+ _ "Good morning, doctors. I have taken the liberty of removing Windows 95 from my hard drive." --The winning entry in a "What were HAL's first words" contest judged by 2001: A SPACE ODYSSEY creator Arthur C. Clarke Can't stop the signal. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Is the SRTM dataset a DEM or a DSM?
In http://srtm.csi.cgiar.org/SRTMdataProcessingMethodology.asp it's called only DEM. In some papers it's called DSM. I'd rather say it's a DSM. But I would also like to know if there are objections ;-) Thank you, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
Hi, thanks again. Hamish wrote: Martina: What I also want to do, is measure distances and angles between objects on my images. For the moment I don't really see where to search for this kind of tools. I thought that it would be possible to draw lines and measure them and angles between them? ... d.measure works fine finally for measuring distances (even if I don't get to work the command line d.measure but only the one in menu of the Map Display). But I still don't have an idea about how to measure the angle between two of this drawn lines. --this won't work correctly for lat/lon, only projected locations-- Yes, I need the lat/lon files only to print some maps for somebody and I'm doing (or at least trying) to do my analysis on the UTM files. maybe the easies way is to use d.where (use middle mouse button to draw a line) then take the two east and north coordinates: # pythag hypot: a^2 + b^2 = c^2 distance = sqrt( (e2-e1)^2 + (n2-n1)^2 ) # angle: tan(theta) = opposite side of triange / adjacent side theta = atan2(n2-n1, e2-e1) $radians2deg: theta_degrees = theta * 180/pi # convert angle counterclockwise-from-east to clockwise-from-north: heading = 90 - theta_degrees if(heading < 0) then heading = heading + 360 you could write a little script to process all that from two mouse clicks. d.where | awk ... or COORDS=`d.where` . ok,... so there is nothing implemented I'll see, either I'll write this script or I'll just print a map and measure the angles by hand, should be faster and good enough for what we need! Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
Hi Hamish, thanks for your patience :-). Border not yet implemented for LatLong locations: border not drawn. apparently LatLong is not supported by Grass as I would like to! that just draws a box around the screen with tick marks. just a minor thing which doesn't affect the grid at all. to get rid of the warning just to 'd.grid -b' or update to a newer version of GRASS which now supports that. Ok, I see, I thought that this error message was also linked to the fact that my map is distorted and that I couldn't draw a grid. For the grid I'm fine now, my error was that the units for the gridlines are not in degrees, but in rad or something like that. But my graph is twice much larger than I expected it (and looks quite ugly), but probably it's due to the fact that Grass takes the same distance for 1degree in NS and EW in LongLat. It seams also impossible to draw a North arrow and a scale in LongLat. Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.terraflow: several questions for understanding + info about TerraSTREAM
About terminology Maybe I'm wrong but from my understanding... D4, D8 are two type of single flow direction as in both case the flow can go only in one of the 8 or 4 neighbors cells. Dinfinity, allows to determinate the single direction, as an angle between 0 and 360 degree. In the opposite multiple flow direction, allows flow to route in more than one of the neighbors cells. Maxi Moritz Lennert wrote: Hello, I have a few questions trying to understand r.terraflow details: 1) SFD r.terraflow offers the possibility to work with single flow direction (SFD) instead of multiple flow direction (MFD). However, the drainage direction output map is strictly identical in both modes, indicating combinations of multiple directions. So, at which stage of r.terraflow does SFD come to play ? Only during accumulation calculation ? Would it be possible to output an SFD direction map from r.terraflow (I know of Hamish's Matlab script, but would be nice to have this directly in the module) ? 2) Terminology issue The man page says this: "Flow directions are computed using either the MFD (Multiple Flow Direction) model or the SFD (Single Flow Direction, or D8) model." I'm no expert in flow routing, but it seems weird to equate D8 to SFD. I would have thought that D8 designates the number of possible directions (8 as opposed to 4 in D4 or ininite in D-Infinity) and that SFD/MFD designates the number of directions actually chosen for routing. 3) Weighting of directions I can't find any information in the man page on whether flow in MFD is weighted by slope, i.e. whether the amount of water attributed to a particular direction depends on the slope, or whether the amount is just equally divided amongst all directions. 4) TerraSTREAM Finally, are there any plans to integrate the GRASS implementation of TerraSTREAM (http://www.madalgo.au.dk/Trac-TerraSTREAM/wiki) into the GRASS SVN ? Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user -- - Dr. Massimiliano Cannata Environmental & Geomatic Engineer Institute of Earth Scences - SUPSI Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND Tel:+41 (0)58 / 666 62 14 Fax:+41 (0)58 / 666 62 09 E-mail: [EMAIL PROTECTED] Web: http://www.ist.supsi.ch http://istgis.ist.supsi.ch:8001/geomatica/ --- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
Martina: > >> What I also want to do, is measure distances and > >> angles between objects on my images. For the moment I don't > >> really see where to search for this kind of tools. I thought that > >> it would be possible to draw lines and measure them and angles > >> between them? ... > d.measure works fine finally for measuring distances (even > if I don't get to work the command line d.measure but only > the one in menu of the Map Display). > But I still don't have an idea about how to measure the > angle between two of this drawn lines. --this won't work correctly for lat/lon, only projected locations-- maybe the easies way is to use d.where (use middle mouse button to draw a line) then take the two east and north coordinates: # pythag hypot: a^2 + b^2 = c^2 distance = sqrt( (e2-e1)^2 + (n2-n1)^2 ) # angle: tan(theta) = opposite side of triange / adjacent side theta = atan2(n2-n1, e2-e1) $radians2deg: theta_degrees = theta * 180/pi # convert angle counterclockwise-from-east to clockwise-from-north: heading = 90 - theta_degrees if(heading < 0) then heading = heading + 360 you could write a little script to process all that from two mouse clicks. d.where | awk ... or COORDS=`d.where` . but that is left as an exercise for another day. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
> Border not yet implemented for LatLong locations: border > not drawn. > > apparently LatLong is not supported by Grass as I would > like to! that just draws a box around the screen with tick marks. just a minor thing which doesn't affect the grid at all. to get rid of the warning just to 'd.grid -b' or update to a newer version of GRASS which now supports that. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] how to select island polygons with grass
Nikos: > Helpful might be also the "error map" (?) > > v.clean [...] error=error_map yes, v.clean + v.overlay also v.disolve + v.overlay also 'v.extract cat=1-99' + v.overlay some combo till it works.. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
AW: [GRASS-user] how to select island polygons with grass
hi markus, thanks for your quick answer, but i made a mistake. the pseudo code i wrote was to select dangles, the selection criteria for an island is a polygon whose boundary consists only of one line for example --x-- | A| | |- | | | | ||b |c | | B |d | C| | | || | |-x| | | | | --x-- a A,B,C = polygons a,b,c,d = lines x= nodes a normal polygon (A,C) has at least two boundaries, an island polygon (B) has usually only one boundary (d) do you also know a solution for this query? thanks and excuse the wrong description christian > -Ursprüngliche Nachricht- > Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Im Auftrag von Markus Neteler > Gesendet: Mittwoch, 25. Juni 2008 16:59 > An: Strobl, Christian > Cc: grass-user@lists.osgeo.org > Betreff: Re: [GRASS-user] how to select island polygons with grass > > On Wed, Jun 25, 2008 at 3:46 PM, <[EMAIL PROTECTED]> wrote: > > > > hi all, > > principally an easy question but i have spent a few hours > with google > > and found nothing. is there a possibilty with grass to > select island > > polygons from a grass vector map, for example with arcinfo > it was very > > easy > > > > Pseudocode: select Polygons from polygonLayer where leftPolygon = > > rightPolygon > > With v.to.db you can select left and right sides. > Usage example: > https://stat.ethz.ch/pipermail/r-sig-geo/2005-October/000616.html > > > p.s. exist any possibilities to select geometries with other > > topological criteria, for example dangle lines. i know that is > > possible to delete them with clean but i am looking for a > possibility > > only to select them > > v.edit can select: > http://grass.osgeo.org/grass64/manuals/html64_user/v.edit.html > > In the new digitizer in wxpython there should be such > functionality to catch dangles. > > Hope this helps a bit > Markus > > -- > Open Source Geospatial Foundation > http://www.osgeo.org/ > http://www.grassbook.org/ > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] how to select island polygons with grass
On Wed, 2008-06-25 at 16:59 +0200, Markus Neteler wrote: > > > p.s. exist any possibilities to select geometries with other > topological > > criteria, for example dangle lines. i know that is possible to > delete > > them with clean but i am looking for a possibility only to select > them > > v.edit can select: > http://grass.osgeo.org/grass64/manuals/html64_user/v.edit.html > > In the new digitizer in wxpython there should be such functionality > to catch dangles. Helpful might be also the "error map" (?) v.clean [...] error=error_map ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] how to select island polygons with grass
On Wed, Jun 25, 2008 at 3:46 PM, <[EMAIL PROTECTED]> wrote: > > hi all, > principally an easy question but i have spent a few hours with google > and found nothing. is there a possibilty with grass to select island > polygons from a grass vector map, for example with arcinfo it was very > easy > > Pseudocode: select Polygons from polygonLayer where leftPolygon = > rightPolygon With v.to.db you can select left and right sides. Usage example: https://stat.ethz.ch/pipermail/r-sig-geo/2005-October/000616.html > p.s. exist any possibilities to select geometries with other topological > criteria, for example dangle lines. i know that is possible to delete > them with clean but i am looking for a possibility only to select them v.edit can select: http://grass.osgeo.org/grass64/manuals/html64_user/v.edit.html In the new digitizer in wxpython there should be such functionality to catch dangles. Hope this helps a bit Markus -- Open Source Geospatial Foundation http://www.osgeo.org/ http://www.grassbook.org/ ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
On 25/06/08 15:15, Martina Schaefer wrote: Hi Moritz, what you propose sounds good for me ... but it didn't work :-( What I want to do is the following: I have satellite photos from a glacier and we want to get an idea of the distribution of the crevasses over this glacier. In a first step we want to assign every 100x100m grid cell of this glacier a value reflecting if there are very little, some, a lot of crevasses. As we don't know for the moment how to do this automatically (perhaps it would be possible to use the color in a next step), the idea was to define this value by "eyeballing". Any ideas how to do this a better way are welcome, too, but I think it's not easy. Now the questions is "only" how to handle the grid and my values in Grass ... You could use v.mkgrid to create a vector grid, ^^ I created such a grid. This grid does not appear in the list ¨Select item" when I do "add a raster layer" in the GIS Manager. I hope this is normal? Yes, see hint just above ;-) As Rows and Columns I put the rows an columns of my x-y gridding, I hope this is correct? What do you mean by "my x-y gridding". As you want to have grid cells of a given size, you will have to calculate your number of grids. You have two options for creating your grid: 1) using position=region - Set your region extents to multiples of your grid resolution (i.e. 100m in your case) - the origin of your grid will be the lower left corner defined by your region - Calculate your numbers of columns and rows using the region extension info (g.region -p), i.e. rows=North-South/Resolution, cols=East-West/Resolution 2) using position=coor (idependent of region settings) - Choose a point at the South-West corner just outside of your image as starting point. Depending on your needs you might want to round these coordinates to your resolution. - Use r.info on your image to identify its extents - Calculate your numbers of columns and rows using the image extents, i.e. rows=North-South/Resolution, cols=East-West/Resolution add a column for number of crevasses with v.db.addcol, in v.db.addcol my new grid appears in the list of items for "vector map for which to edit attribut table), I put layer=1 and name=D then I get "DBMI-DBF driver error: SQL parser error in statement: ALTER TABLE density ADD COLUMN D Error in db_execute_immediate() Error while executing: "ALTER TABLE density ADD COLUMN D " ERROR: Cannot continue (problem adding column)." Has anybody an idea what this could mean? Yes, you need to indicate the type of column as well, so the columns parameter should be 'D int' if D is supposed to hold the number of crevasses which I believe would be integers. The general idea of my proposal was to create a _vector_ grid with the relevant column in its attribute table and then use the digitization tool v.digit to display this grid on top of your image and edit the attribute values after visually identifying the number of crevasses in your grid cell. You would then end up with a vector grid map with the crevasse count in each cell. If necessary, you can transform this into raster with v.to.rast. Another option to replace v.digit would be to use the command line and "old-style" monitors to display your two layers and then use d.what.vect -e to edit the attributes. Something like this (in a terminal - after having added your count column to the vector grid's attribute table): d.mon x0 d.rast YourImage d.vect YourGrid type=area fcol=none d.what.vect -e map=YourGrid (-> click on the map to see a form pop up) Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
Hi Paul, If you run g.proj -c georef=filename where filename is the name of the file that contains the correct co-ordinate system info, it will overwrite the current location's projection with the correct values. Although only do this if you are sure the projection is definitely correct, and not just a default value that the other software added into the file. Add the -i flag as well as -c if you want to be interactively prompted for datum parameters (with some hints on which ones to pick). This worked fine, besides the -i flag which doesn't exist (?) in my version. But now I have new troubles In LatLong the display of my map is distored and when I try to add a grid I get the following error message PNG: GRASS_TRUECOLOR status: TRUE PNG: collecting to file: /home/martina/Work/grassdata/BelcherLLnew/Martina/.tmp/berg.physics.mun.ca/31669.3.ppm, GRASS_WIDTH=642, GRASS_HEIGHT=110 Border not yet implemented for LatLong locations: border not drawn. apparently LatLong is not supported by Grass as I would like to! Thanks anyway, it was a try :-). Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Cat problem with v.db.join
Dear User list, I am having some trouble with v.db.join. I have 13 point vector files with tables connected and created using sqlite. I copy one of the files and rename it AnalysisData I would now like to use v.db.join to join all of my 13 files to AnalysisData. All 13 files have the same number of points as they were generated from rasters of exactly the same size (125*125). My join field is cat in both and unfortunately I have run into the duplicate 'cat' issue mentioned in the archives. I then updated AnalysisData and generated a new column and copied the values from 'cat' using v.db.update to create a new join column. Again the 'cat' issue poped up. It isnot possible to change the column name cat either. In the archives I see that this problem has been solved in 6.4 but am weary of installing a 'development' version of grass. One other thing, surely all grass vectors have a column 'cat' and even if they were not used in the join the problem would persist. Am I missing something? Many thanks for all your help, Wesley -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] New User Getting Started
Try using r.stats (inputing both maps) to get a text file output of the matching values from both maps. Then feed this into something that will make your graphs (stat program, spreadsheet, etc.). Michael On 6/25/08 1:03 AM, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Message: 3 > Date: Tue, 24 Jun 2008 11:25:21 -0700 > From: Brock Anderson <[EMAIL PROTECTED]> > Subject: [GRASS-user] New User Getting Started > To: grass-user@lists.osgeo.org > Message-ID: <[EMAIL PROTECTED]> > Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed > > Hi Folks, > > I'm new to GRASS, and I'm hoping somebody can give me some advice to > get me started... > > I have two netcdf raster grids. One is seafloor age, the other is > seafloor depth. The files both cover the same geographic area, > although the grids are different resolutions. > > What I want to do is plot a simple x-y graph of seafloor age vs. > depth, where each point in my graph represents the a seafloor age > grid cell and the intersecting seafloor depth cell. > > Can this be done? Can anyone suggest some basic steps to get me > started? No instruction is too basic for me -- this is my first day > with GRASS. I have just installed GRASS (and R, just in case it's > necessary), but otherwise I have no idea how to proceed. > > Thanks, > Brock __ Michael Barton, Professor of Anthropology Director of Graduate Studies School of Human Evolution & Social Change Center for Social Dynamics & Complexity Arizona State University phone: 480-965-6213 fax: 480-965-7671 www: http://www.public.asu.edu/~cmbarton ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
Hi again, What I also want to do, is measure distances and angles between objects on my images. For the moment I don't really see where to search for this kind of tools. I thought that it would be possible to draw lines and measure them and angles between them? m.cogo might help. or 'v.distance upload=to_along,to_angle', d.measure, v.to.db... In general beware to double check results/meaning if using a lat/lon location (see d.rhumbline and d.geodesic), or map projection with possibly heavy distortion at far distances. If you build the Python SWIG interface there is also a m.distance module to look at. see also this thread+code patch from March: "How to find out an angle between to points on the map" http://thread.gmane.org/gmane.comp.gis.grass.user/22817/ http://thread.gmane.org/gmane.comp.gis.grass.devel/25396/ d.measure works fine finally for measuring distances (even if I don't get to work the command line d.measure but only the one in menu of the Map Display). But I still don't have an idea about how to measure the angle between two of this drawn lines. I went through the thread indicated about, but I didn't understand anything :-(. Thanks for your help, Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] how to select island polygons with grass
hi all, principally an easy question but i have spent a few hours with google and found nothing. is there a possibilty with grass to select island polygons from a grass vector map, for example with arcinfo it was very easy Pseudocode: select Polygons from polygonLayer where leftPolygon = rightPolygon thanks and greetings from munich christian p.s. exist any possibilities to select geometries with other topological criteria, for example dangle lines. i know that is possible to delete them with clean but i am looking for a possibility only to select them ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] import satellite data in Grass
Hi Moritz, what you propose sounds good for me ... but it didn't work :-( What I want to do is the following: I have satellite photos from a glacier and we want to get an idea of the distribution of the crevasses over this glacier. In a first step we want to assign every 100x100m grid cell of this glacier a value reflecting if there are very little, some, a lot of crevasses. As we don't know for the moment how to do this automatically (perhaps it would be possible to use the color in a next step), the idea was to define this value by "eyeballing". Any ideas how to do this a better way are welcome, too, but I think it's not easy. Now the questions is "only" how to handle the grid and my values in Grass ... You could use v.mkgrid to create a vector grid, I created such a grid. This grid does not appear in the list ¨Select item" when I do "add a raster layer" in the GIS Manager. I hope this is normal? As Rows and Columns I put the rows an columns of my x-y gridding, I hope this is correct? add a column for number of crevasses with v.db.addcol, in v.db.addcol my new grid appears in the list of items for "vector map for which to edit attribut table), I put layer=1 and name=D then I get "DBMI-DBF driver error: SQL parser error in statement: ALTER TABLE density ADD COLUMN D Error in db_execute_immediate() Error while executing: "ALTER TABLE density ADD COLUMN D " ERROR: Cannot continue (problem adding column)." Has anybody an idea what this could mean? Thanks, Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] slope along defined section (e.g. road, stream,)
Konstanin: > I am trying to get the profile (height) of a road network. > I am following a similar idea than you, but have troubles to > get it working (mainly because I have problems with the syntax > of awk and grep). Maybe you could explain what happens in each > line of your script so it is easier for me to understand ... - #spearfish dataset VMAP=railroads QMAP=slope OUT=rr_slope_points v.out.ascii "$VMAP" format=standard | grep '^ [0-9]' | \ grep -v ^' 1 ' | awk '{print $1 "," $2}' | \ r.profile -g -c in="$QMAP" --quiet 2> /dev/null | \ grep -v ' \* ' | cut -f1,2,4,5 -d' ' | \ v.in.ascii x=1 y=2 out="$OUT" fs=space \ columns='x double, y double, slope double, GRASSRGB varchar(11)' d.vect -a "$OUT" size=0 width=2 (line vertices only; bug: includes profiles between line jumps...) - # output lines in grass vector ascii format v.out.ascii "$VMAP" format=standard | \ # find lines which start with a space, then a number (so no "L 12345") grep '^ [0-9]' | \ # find lines which do NOT start with a space then a 1 then another space # (ie category IDs) grep -v ^' 1 ' | \ # print the first and second numbers with a comma between them awk '{print $1 "," $2}' | \ # feed those coords into r.profile r.profile -g -c in="$QMAP" --quiet 2> /dev/null | \ # select lines in the profile which are NOT "*" (ie NULL data) grep -v ' \* ' | \ # take columns 1,2,4, and 5, using a space delimiter between columns cut -f1,2,4,5 -d' ' | \ # import that back in as a points map. v.in.ascii x=1 y=2 out="$OUT" fs=space \ columns='x double, y double, slope double, GRASSRGB varchar(11)' Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.terraflow: several questions for understanding + info about TerraSTREAM
Hello, I have a few questions trying to understand r.terraflow details: 1) SFD r.terraflow offers the possibility to work with single flow direction (SFD) instead of multiple flow direction (MFD). However, the drainage direction output map is strictly identical in both modes, indicating combinations of multiple directions. So, at which stage of r.terraflow does SFD come to play ? Only during accumulation calculation ? Would it be possible to output an SFD direction map from r.terraflow (I know of Hamish's Matlab script, but would be nice to have this directly in the module) ? 2) Terminology issue The man page says this: "Flow directions are computed using either the MFD (Multiple Flow Direction) model or the SFD (Single Flow Direction, or D8) model." I'm no expert in flow routing, but it seems weird to equate D8 to SFD. I would have thought that D8 designates the number of possible directions (8 as opposed to 4 in D4 or ininite in D-Infinity) and that SFD/MFD designates the number of directions actually chosen for routing. 3) Weighting of directions I can't find any information in the man page on whether flow in MFD is weighted by slope, i.e. whether the amount of water attributed to a particular direction depends on the slope, or whether the amount is just equally divided amongst all directions. 4) TerraSTREAM Finally, are there any plans to integrate the GRASS implementation of TerraSTREAM (http://www.madalgo.au.dk/Trac-TerraSTREAM/wiki) into the GRASS SVN ? Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Two questions - vector data and Mac install
On 25/06/08 02:46, Richard Chirgwin wrote: Hi all, 1) v.overlay question I have three maps: two area vectors (A and B), and a v.overlay result (C). Is there a simple way to assign the percentage of areas in (A) covered by the overlay (C)? Vector solution: http://lists.osgeo.org/pipermail/grass-user/2008-June/045290.html Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] New User Getting Started
On 24/06/08 20:25, Brock Anderson wrote: Hi Folks, I'm new to GRASS, and I'm hoping somebody can give me some advice to get me started... I have two netcdf raster grids. One is seafloor age, the other is seafloor depth. The files both cover the same geographic area, although the grids are different resolutions. What I want to do is plot a simple x-y graph of seafloor age vs. depth, where each point in my graph represents the a seafloor age grid cell and the intersecting seafloor depth cell. Can this be done? Can anyone suggest some basic steps to get me started? No instruction is too basic for me -- this is my first day with GRASS. I have just installed GRASS (and R, just in case it's necessary), but otherwise I have no idea how to proceed. I suppose your two files are georeferenced. 1) Create projected location using the "create new location using...georeferenced file" 2) Import both files with r.in.gdal (File->Import raster maps->Multiple formats with gdal) 3) Several possibilities for extracting your information - Use 'r.stats -n1 input=Age,Depth' to extract the values pixel by pixel (use the command line as this can crash your GUI if you have large images); - Use r.coin (Raster -> Reports and statistics-> Mutual category occurrences (coincidence)) to get the matrix of coincidence; - You also have r.regression.line to calculate the regression coefficients between the two, and r.covar to calculate covariance/correlation coefficients. 4) Use whatever graphics software you want to make a graph out of this information ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
At the moment I solve it by splitting the label data ("category 3; category 12 ..") to separate database backend columns. Use such modules like v.db.addcol, v.db.select and v.db.update to create own columns for each crossing category. But unfortunately it takes a little bit too long... Regards, Christian. Am Dienstag, den 24.06.2008, 15:32 +0200 schrieb Christian Schwartze: Zitat von Hamish <[EMAIL PROTECTED]>: > > > > Christian Schwartze > > > Ok and thanks, better to look at first within GRASS if > > > eveything is working fine > > > ;) (in cats/ full category values) Because the reduced line > > > comes from QGIS > > > (selection tool). I forgot to say that following r.cross I > > > do a conversion with > > > r.to.vect and export the result to a shapefile. So the > > > original label vals were > > > mapped to dbf-column type "C". But why exporting only 80 chars? > > > > > > Does v.db.select show the cut string? > > which DB backend? (dbf?) > > v.db.select shows the full length of column label for all data rows - nothing is > missing. I use dbf backend. > > > > > "db.describe -c vect_map" ? > > ncols:3 > Column 1:cat:INTEGER > Column 2:value:INTEGER > Column 3:label:CHARACTER > > > > > Christian. > > > > > > > Hamish > > > > > > > > > > > > > > > > > > This mail was sent through http://webmail.uni-jena.de > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Two questions - vector data and Mac install
Christian Schwartze wrote: Hi, Hi all, 1) v.overlay question I have three maps: two area vectors (A and B), and a v.overlay result (C). Is there a simple way to assign the percentage of areas in (A) covered by the overlay (C)? What I think of in a rush is to rasterize the areas first and afterwards asking for the overlapping areas in percent with r.stats -a input=map1,map2 Regards, Christian. Christian, Thanks, I will give this a try. By the way, install fixed, somehow Mac OSX X got lost ... RC 2) Mac install Wish 8.4 is breaking on a friends new installation, with the reason as "image not found". Do we need to reinstall X or is it something else? Richard Chirgwin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Two questions - vector data and Mac install
Hi, > Hi all, > > 1) v.overlay question > > I have three maps: two area vectors (A and B), and a v.overlay result > (C). Is there a simple way to assign the percentage of areas in (A) > covered by the overlay (C)? What I think of in a rush is to rasterize the areas first and afterwards asking for the overlapping areas in percent with r.stats -a input=map1,map2 Regards, Christian. > > 2) Mac install > > Wish 8.4 is breaking on a friends new installation, with the reason as > "image not found". Do we need to reinstall X or is it something else? > > Richard Chirgwin > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] slope along defined section (e.g. road, stream,)
Hi, I am trying to get the profile (height) of a road network. I am following a similar idea than you, but have troubles to get it working (mainly because I have problems with the syntax of awk and grep). Maybe you could explain what happens in each line of your script so it is easier for me to understand ... thanks , konstantin #spearfish datasetVMAP=railroadsQMAP=slopeOUT=rr_slope_pointsv.out.ascii "$VMAP" format=standard | grep '^ [0-9]' | \ grep -v ^' 1 ' | awk '{print $1 "," $2}' | \ r.profile -g -c in="$QMAP" --quiet 2> /dev/null | \ grep -v ' \* ' | cut -f1,2,4,5 -d' ' | \ v.in.ascii x=1 y=2 out="$OUT" fs=space \ columns='x double, y double, slope double, GRASSRGB varchar(11)'d.vect -a "$OUT" size=0 width=2(line vertices only; bug: includes profiles between line jumps...)Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user