Re: [GRASS-user] v.rast.stats over a large vector file
Hi Sab, v.stats _IS_ very slow (for many primitives). Maybe you could analyse the database, where you can calculate the statistics you like. For spatial statistics you can analyse uploaded coordinates of centroids or sizes of area. Hope it helps a bit, Achim Am 26.11.2010 12:32, schrieb razmjoo...@faunalia.co.uk: Dear list I am trying to run v.rast.stats for a large vector file. It contains around 70 buildings representing buildings. here is my g.region info g.region -p projection: 99 (Transverse Mercator) zone: 0 datum: osgb36 ellipsoid: airy north: 183010.45829976 south: 153516.19024768 west: 513122.49174945 east: 555953.95182415 nsres: 4.99987592 ewres: 5.00017045 rows: 5899 cols: 8566 cells: 50530834 THe problem I am having is the process is extremely slow. It has done 150 features out of 70 areas after 2 hours. I need just the average raster value within each building (feature). My questions are: - Is there something I can do to speed up the process? - Is there a way just to get the average value rather than the whole set of statistical parameters (I am not even using -e option) Any advice on that is highly appreciated. Regards Sab ___ 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] Memory problems with v.in.ogr
Hi, My guess: 7GB is a lot. 334611 primitives are many, but not that much, but: you got 18 millions vertices! (18459167) That seems a lot. Depending on how tangled your lines are, a potential mass of features can be generated. Just a guess, best, Achim Am 26.11.2010 03:14, schrieb Pierre Roudier: Dear list, I am trying to load a pretty big shapefile on GRASS (6Mb +, 211621 features) using v.in.ogr, but each attempt fails at the 'break boundaries'' stage (at 98%!): GRASS 7.0.svn (NZTM2000):~> v.in.ogr dsn=~/Documents/DATA/LCDB2/ni_nzmg.shp out=ni_lcdb2 --o Projection of input dataset and current location appear to match Layer: ni_nzmg Counting polygons for 211621 features... Importing map 211621 features... 100% - Building topology for vector map... Registering primitives... 334611 primitives registered 18459167 vertices registered Number of nodes: 211681 Number of primitives: 334611 Number of points: 0 Number of lines: 0 Number of boundaries: 334611 Number of centroids: 0 Number of areas: - Number of isles: - - WARNING: Cleaning polygons, result is not guaranteed! - Break polygons: 100% 100% - Remove duplicates: 100% - Break boundaries: ERROR: G_calloc: unable to allocate 50 * 8 bytes of memory at allocation.c:82 The shp loads without any problems on QGIS. Here is my config: GRASS 7.0.svn (NZTM2000):~> g.region -p projection: 99 (New Zealand Map Grid) zone: 0 datum: nzgd49 ellipsoid: international north: 6115136.31665518 south: 6114206.6264583 west: 2703766.53250003 east: 2705045.64941879 nsres: 1.99933376 ewres: 1.99862019 rows: 465 cols: 640 cells: 297600 GRASS 7.0.svn (NZTM2000):~> g.version GRASS 7.0.svn44411 (2010) OS: Opensuse 11.3, with 7Gb RAM. Any pointers appreciated, Pierre ___ 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] Help with viewer
Well: Q-GIS? Achim Am 25.11.2010 09:03, schrieb Giacomo Piva: Ciao a tutti, Hi all, Does someone know a good GeoTIFF (and other image format) free and multi-platform viewer software? Thank you ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] help, manual and instructions on how to use legend
http://grass.fbk.eu/gdp/html_grass64/d.legend.html ? Achim Am 17.11.2010 17:18, schrieb Monica Buescu: Greetings I'm trying to find an help page/wiki on use of legend but i'm not able to find anything Can anyone indicate me one? Thanks Monica ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: using v.colors- suggestion of using a sqlite suggestion
Hello Luisa, (see below) Am 17.11.2010 16:21, schrieb Luisa Peña: Hello achim 1- I converted from raster to vector (r.to.vect) r.to.vect -v input=teste01_l...@regional output=vector01 feature=area Extracting areas... Building topology for vector map ... Registering primitives... 833 primitives registered 4624 vertices registered Building areas... 334 areas built 163 isles built Attaching islands... Attaching centroids... Number of nodes: 662 Number of primitives: 833 Number of points: 0 Number of lines: 0 Number of boundaries: 499 Number of centroids: 334 Number of areas: 334 Number of isles: 163 r.to.vect complete. 2- When I select a designated area i get this: East: 629238.662505 North: 9331859.599043 Map: vector01 Mapset: Regional Type: Area Sq Meters: 1132124355.009 Hectares: 113212.436 Acres: 279754.021 Sq Miles: 437.1157 Layer: 1 Category: 5 Driver: dbf Database: C:\DWEISdata/Brazil/Regional/dbf/ Table: vector01 Key column: cat cat : 5 label : (CAT IS the value of my previous raster) 3- When i do: v.db.connect map=vecto...@regional table=vector01 driver=sqlite I get the following error: ERROR: Use -o to overwrite existing link for layer <1> THis will mean that it will overwrite existing table right? I tried with -o and I got the error: DBMI-SQLite driver error: Unable to open database: unable to open database file Unable to open database <$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/> by driver Unable open database <$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/> by driver ERROR: Table does not exist in database <$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/> So I'm not able to do what you suggest That means, that no sqlite-db is established. <$GISDBASE/$LOCATION_NAME/$MAPSET/dbf/> is a folder for the dbf-db. A sqlite-db is only one file. You can use one of many programs to create an empty one (eg. there is an firefox add-on that can do that). Store the db (eg. "myname.sqlite") in you gis-folder and connect (in this example case) to: $GISDBASE/myname.sqlite Best regards, Achim Any other suggestion? 2010/11/16 Achim Kisseler mailto:a...@jupiter.uni-freiburg.de>> Hi, you should not loose the information, because the table you create consists of a column "cat" by default containing the cats. Does this do the job? Achim Am 16.11.2010 09:46, schrieb Luisa Peña: Hi Achim Well, the thing is, if I add a table to my vector, I will loose all the information that is already available in my vector (since it's a conversion from a Classification raster I have a cat value for each area). Right? 2010/11/15 Achim Kisseler mailto:a...@jupiter.uni-freiburg.de> <mailto:a...@jupiter.uni-freiburg.de <mailto:a...@jupiter.uni-freiburg.de>>> Am 15.11.2010 16:41, schrieb Luisa Peña: In this email, http://lists.osgeo.org/pipermail/grass-user/2010-November/058644.html, you suggested me to use sqlite as database. I'm willing to try that. How can I do that with a vector created from r.to.vect with categories values in cat column Hi Luisa, first create an sqlite-database, second take the vector file and add an table to it (http://grass.osgeo.org/gdp/html_grass64/v.db.addtable.html: --%<-- DESCRIPTION v.db.addtable creates and adds a new attribute table to a given vector map. It links the table to the specified layer of the vector map. If the vector map is not yet linked to any table, new a database link is established based on the MAPSET database settings (see db.connect). --%<--). Is that what you are looking for? Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] How to delete deadends?
Hi, I did something similar with a river network. 1. Make a network out of it. 2. Count lines connected to each node. (v.net option=nreport) 3. Check the lines: if a related node has only one connected line, delete the line. Cheers, Achim Am 17.11.2010 13:49, schrieb Patrick_schirmer: Hi Maris, Attached you'll find an example as shp and a picture. I search for the lines that is highlighted in the picture, which are the only ones connected to more then one line. My approach would be to create points out of endpoints, buffer endpoints and count points per buffer, but I can't import v.vect.stats, as stated in the other post. Would be great if you or someone else in the list had an idea which works on GRASS 6.4. greetz, Patrick On 11/17/2010 09:57 AM, Maris Nartiss wrote: Hello, can You, please, send in a graphical example or put for download sample data set? Maris. 2010/11/15, Patrick_schirmer: Thanks Markus and Hamish, Unfortunately v.clean rmdangle will not work for me. With Threshhold<0 it deletes more or less all lines, otherwise none. I guess it is because the "nests" of lines consist of 4-20 lines and are all seperated from each other. Per defintion a line "is considered to be a dangle if no other line of given /type/ is on at least one end node" (documentation v.clean rmdangle). As I am searching for lines that have exactly one line as sum of all connecting node, this tool doesn't help. I will try to solve the problem by creating points out of the line (nodes), buffering the points and delete the ones intersecting only one line. But I still hope that there is a more direct solution to delete the line as a geometry. So if there are any other suggestions I would be happy about. I'll keep you up to date in case I find a solution. Cheers, Patrick On 11/12/2010 09:51 PM, Hamish wrote: Patrick_schirmer wrote: I have a lot of lines that are linked to another forming various nets. Several of those lines are deadends. Now I search for a option to delete "dead-ends" within those networks. It would be perfect to delete the lines, or to search for the nodes that link to more than one line. I was searching in v.generalize, v.net, v.to.point, v.to.db but won't find the proper approach. not a v.net specific thing, but in general for vector maps you can use v.clean to remove (or isolate) line "dangles" with the 'rmdangle' (or 'chdangle') tools. maybe that helps, Hamish ___ 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] Re: Values from multiple raster - "to link" together
Am 15.11.2010 23:36, schrieb Gabriele N.: Hi Achim. Returning to the problem of the three maps in some cases remain the problem (for example for the map "C"), because some numbers are 2 digits and another with 1 digit. For example, with values A = 12 B = 3323 C = 1 instead of 1233231 I have 12332301 :/ Sorry, but I dont understand the problem. How do you know the origin number later when eg C has sometimes length 1 and sometimes more? ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Values from multiple raster - "to link" together
Am 15.11.2010 23:10, schrieb Gabriele N.: Excellent Alex:). The maps are as follows: A -> value 0, 1, 2, ... 19 B -> value 0, 1001, 1002, 1003 3351 C -> value from 0, 1, 2, 3, 4 .. 15 So, I did as you suggested: r.mapcalc "output" = "(( "A" *100)+( "B" *100)+ "C" )" right? And if I had decimal numbers or strings instead of numbers? Thanks Gabriele Strings in a raster map? With decimal numbers it works the same way. Or you multiply the map with number of digits and handle it as an integer map (maybe that does not work because of limited bit information per pixel). Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Exporting Vector data to SHP (v.out.ogr)- takes a lot of time
Am 15.11.2010 10:47, schrieb Markus Metz: Since the vector to be exported is a converted raster, apparently without further modification, why not exporting the raster? ...I thought the same. What do you want to do? Maybe you can tile the raster and create some or many vector maps? Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: using v.colors- suggestion of using a sqlite suggestion
Am 15.11.2010 16:41, schrieb Luisa Peña: In this email, http://lists.osgeo.org/pipermail/grass-user/2010-November/058644.html, you suggested me to use sqlite as database. I'm willing to try that. How can I do that with a vector created from r.to.vect with categories values in cat column Hi Luisa, first create an sqlite-database, second take the vector file and add an table to it (http://grass.osgeo.org/gdp/html_grass64/v.db.addtable.html: --%<-- DESCRIPTION v.db.addtable creates and adds a new attribute table to a given vector map. It links the table to the specified layer of the vector map. If the vector map is not yet linked to any table, new a database link is established based on the MAPSET database settings (see db.connect). --%<--). Is that what you are looking for? Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Need some help in converting a contour map to DEM map...
of the DEM after exagerating it.Now I am looking forward to drape an aerial image of the same area on the DEM that I have got. In order to do this I loaded the DEM map and then draped the imported aerial map (imported using r.in.gdal, but that single jpeg image(satimage.jpg) got imported into 3 different maps namely satimage.red, satimage.green, satimage.blue, therefore is just draped only one of it on the DEM). The output view that I get seems okay but its too dark (black and white-- please see the attachment), though the original aerial image was colourful which I had imported. Why is it happening so?? Can any one help me with this. Hi Nikhil, take a look at http://grass.fbk.eu/grass64/manuals/html64_user/imageryintro.html it might give you a good introduction. especially this part: Visualizing (true) color composites To quickly combine the first three channels to a near natural color image, the GRASS command d.rgb can be used or the graphical GIS manager (gis.m). It assigns each channel to a color which is then mixed while displayed. With a bit more work of tuning the grey scales of the channels, nearly perfect colors can be achieved. Channel histograms can be shown with d.histogram. Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Exporting Vector data to SHP (v.out.ogr)- takes a lot of time
Am 12.11.2010 09:40, schrieb Luis Lisboa: The problem is that, I left it this night processing and, when I returned it has freezed. So, v.out.ogr is not being able to export vector files produced by r.to.vect... As I said, maybe it's related with some option in r.to.vect that is messing this up. Or something related with tables. Can anyone give me some tips on this? I guess it freezes because it uses so much memory. Please check if v.out.ogr works with a small vector map. E.g. shrink region before r.to.vect or choose only some features from the vector map to export. ? Achim Thanks Luis ...that´ll be a HUGE vector file! So it´s normal, that it takes some minutes. On Thu, Nov 11, 2010 at 3:08 PM, Luis Lisboa mailto:luislisboa1...@gmail.com>> wrote: Greetings I have produced a vector map (with r.to.vector) with the following metadata: v.info <http://v.info> test01 ++ | Layer: teste01 | | Mapset: Regional | | Location:Country | | Database:E:\v3 | | Title: | | Map scale: 1:1 | | Map format: native | | Name of creator: orbit | | Organization: | | Source date: Tue Nov 09 11:11:40 2010 | || | Type of Map: vector (level: 2) | | | | Number of points: 0 Number of areas: 213680 | | Number of lines:0 Number of islands: 73649 | | Number of boundaries: 348770 Number of faces: 0 | | Number of centroids:213666 Number of kernels: 0 | | | | Map is 3D: No | | Number of dblinks: 1 | | | | Projection: Universal Transverse Mercator (zone 0) | | N: 8832707.83027649S: 7028073.62772369 | | E: 1347458.42001915W:200792.5777576 | | | | Digitization threshold: 0 | | Comments: | | | ++ Now I'm trying to export it to SHAPEFILE but, after 10 minutes the processing bar is not even in 40%. What might be happening? I mean, is it some error with the vector or when I convert to vector (from raster)? Because, taking more than 10 minutes to export to vector it's not normal (I guess) and taking nearly 7 min to convert to vector also... Thanks for the reply Luis L ___ 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] Exporting Vector data to SHP (v.out.ogr)- takes a lot of time
Hi, Am 11.11.2010 16:08, schrieb Luis Lisboa: | Type of Map: vector (level: 2) | | | | Number of points: 0 Number of areas: 213.680 | | Number of lines:0 Number of islands: 73.649 | | Number of boundaries: 348.770 Number of faces: 0 | | Number of centroids:213.666 Number of kernels:0 | ...that´ll be a HUGE vector file! So it´s normal, that it takes some minutes. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] raster data output
Did you see: http://grass.fbk.eu/statsgrass/grass_geostats.html ? Am 10.11.2010 16:23, schrieb Steve Wangen: Hello list - There may be a simple solution to my problem, but I'm a bit new to grass and haven't been able to track it down yet, so I was wondering if anyone had suggestions. I'm trying to output the cell contents of multiple rasters into a single table that I can save to a file with the desired result looking like this: x-coord y-coord raster1 raster2 raster3 ... 0 0 1 23 ... 0 1 0 12 ... 0 2 0 01 ... etc... with the idea of doing some time series analyses, where the subsequent rasters are different time steps. Ideally this would come out as one table that I could then import into R for analysis. I've had a bit of luck outputing the result of r.stats -x to a file using some bash scripting and then combining all those files manually, but it seems there would be an easier solution. Any suggestions would be appreciated. Thanks! -Steve ___ 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] Re: Need some help in converting a contour map to DEM map...
Hi Nikhil, > And one more thing is > that how have you converted the height to integer please give me details of > this too. I am really very thankful for your time and effort. There are many ways. For example like Micha said: --%<-- I'm including a mapset "bombay" with the contour vecto, the contour raster and the resulting dem. Like Achim said, first you must convert the HEIGHT column to integer (I did this with Openoffice Calc). --%<-- here he means the dbf-file or you change the table after imported (using SQL) I think the output you got is correct. But when i try to change the resolution (eg: 0:00:01) in the g.region resolution tab(GRID resolution 2D both north-south and east-west), it gives an error saying :ERROR: Invalid input". Am i doing something wrong???. check your projection units (g.proj -p) and your region (g.region -p) Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Using v.colors in WinGRASS
Am 09.11.2010 15:51, schrieb Luisa Peña: Ok I implented what is in 4r44284 1- v.db.connect -p map=teste_09_LULC layers <1> table in database through driver with key CVector map is connected by: Vector map should be connected by something. So there is still something wrong. Did you try another database type? (like eg. sqlite?) ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re:Using v.colors in WinGRASS
Am 09.11.2010 14:07, schrieb Martin Landa: why confusing? Vector object categories and attribute management http://grass.osgeo.org/grass64/manuals/html64_user/vectorintro.html yes, everything is written there, but: as I started, when it came to these map-layer-categories-databases-addtable-connect-recategorize-new vector map after operations-new connections... I had some difficulties to find the appropriate steps in the right order. Once you got it, its not so hard anymore. And further, as one can see, I am not the only one. Unfortunately I had no time to make suggestions to improve the manual yet. Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Using v.colors in WinGRASS
Hi, v.db.addcol should be there by default. Maybe there has to be a table connected to the vector map! This can bo done with 'v.db.addtable'. Achim Am 09.11.2010 12:55, schrieb Luisa Peña: v.colors map=teste01_l...@regional column=cat color=aspect I get this error: Creating column ... E:/GRASS6/scripts/v.colors: v.db.addcol: command not found ERROR: Creating color column This v.db.addcol is present in the Scripts folder ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re:Using v.colors in WinGRASS
vector-map - layers - categories - database-connection: thats a bit confusing, but manageble: Am 09.11.2010 13:27, schrieb Luisa Peña: 1- How can I know that this particular vector data does/doesn't have a table? v.db.connect -p map=your_map 2- Since this is a vector, created from a raster (r.to.vect) can I add a table when I create the vector? No, thats what I dont like, too 3- How can I define a table in order to be used by v.colors? v.db.addtable I use sqlite as database, because it consists of only one file (so it is easy (for a single user)). ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Need some help in converting a contour map to DEM map...
Hi Nikhil, e.g. you can do it with: v.surf.rst (http://grass.osgeo.org/gdp/html_grass64/v.surf.rst.html) Does this help? Achim Am 09.11.2010 12:28, schrieb nikmor: I am trying to import an contour file and trying to come up with an DEM map from it. I tried it my way but end up with wrong output. I am looking forward for some one who can import this map and convert it to DEM and finally and most importantly we should be able to view the output in NVIZ. I have attached the folder having the contour data, this data is of IIT bombay. If someone succeeds in doing this, please send me the procedure (with all the details of resolution, grid size etc). I will be very thankful to one who helps me out of this problem. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.thin ?
Hi, how do you use r.thin? Can you post the complete command? Am 09.11.2010 06:25, schrieb charlie: Hi. I am currently using Grass 6.4 on linux and beginning the the process of vectorizing an old NOAA raster map with r.thin. The map is approximately 12,000 pixels by 8,000 pixels wide. According to this post, ( http://osgeo-org.1803224.n2.nabble.com/r-thin-td2718260.html#a2718260 )the iteration variable has to be equal or larger than half the number of cells of the wider line so I increased the iterations to 6,000, and it would up finishing in approximately 4,200 passes. Previously, I was getting excellent preliminary results, with fewer (1,000) iterations, distinct features were visible, however at least 50% of the map was not completed. Now with an increase to 6,000 iterations r.thin completes, but the results are a single 1px wide horizontal line. Im sure I am overlooking something relatively simple; can anyone give me any advice on how to best run r.thin in this particular case? Thanks! Charlie Wetlands ___ 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] Re: Having some difficulties with v.to.rast
Am 05.11.2010 15:31, schrieb Luisa Peña: v.to.rast --overwrite input=teste01_centr...@brazil output=teste01centr...@brazil use=val value=5 But I do have 1 (last) question: When I use the Query pixel value feature, I get this: 568209.941176|9248338.294118||5|Value 5 Does this means that each pixel has a raster value of 5 right? Because I'm also getting Value 5 and I don't what it is.. Yes, setting value=5 means, all areas will be covered with pixels value 5. If you want different values for each area, you have to use use=attr and define a column name containing a numeric (column=your_column) or use=cat to use the categogy value. You can see the categories with "v.category input=... option=report". When you use an attribute, you have to have an table connected with the vector layer. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Having some difficulties with v.to.rast
Hi, there are no areas, because there are no centroids. You can add centroids via v.centroids. You always have to choose a "use"-parameter, otherwise the module does not know, which numbers it has to generate. Achim Am 05.11.2010 14:02, schrieb Luisa Peña: | Number of points: 0 Number of areas: 2 | | Number of lines:0 Number of islands:2 | | Number of boundaries: 2 Number of faces: 0 | | Number of centroids:0 Number of kernels:0 | -- v.to.rast --overwrite input=test...@braziloutput=teste01 use=cat type=areaI get. Loading data... Area without centroid (may be OK for island) Area without centroid (may be OK for island) Pass 1 of 2: Reading areas... Reading features... Writing raster map... Pass 2 of 2: Reading areas... Writing raster map... Converted areas: 2 of 2 Converted points/lines: 0 of 0 v.to.rast complete. With an empty image ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.buffer: circles around points
Hi Sharon, that sould be the radius, but: due to changing distances on latitude, the circle is not a true circle, as you can see when you reproject the map. The buffer distance is in degree. Hope, everything is correct, regards, Achim Am 03.11.2010 06:44, schrieb Sharon M: Hi, I'm starting to use v.buffer to create circles around points on Lat/Long vector maps. When entering a value for the distance parameter for v.buffer to create circles for points on lat/long maps, is the distance entered the radius of the circle or is it the diameter? or some other variable? Thanks in advance, Sharon ___ 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] GRASS in 64-bit Debian Squeeze
Hi Chethan, working on a 64bit system (kubuntu, kernel 2.6.32), GRASS 6.4 seems stable here. On image processing: it'll be a bit faster, but it only makes sense, if you really work a lot with (large) rasters. Regards, Achim Am 30.10.2010 19:45, schrieb Chethan S: Greetings everyone! As of now I am running the release branch of GRASS 6.4.1 release branch version (stable) in 32-bit Ubuntu operating system. I am seriously thinking of migrating to 64-bit OS as I believe image processing like tasks can be faster there. I am considering migration to Debian Squeeze. I am interested to know if GRASS runs fine on 64-bit platform or will some tweaking be necessary? Somewhere I remember reading queries on issues with wxGUI in 64-bit systems. Do such problems exist now too? Thanks and Regards, Chethan S. **-- Chethan S. ___ 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] Database question
Hi, try "v.db.reconnect.all" or "v.db.connect" for single vector layers. Achim Am 25.10.2010 18:54, schrieb Adam Dershowitz, Ph.D., P.E.: This seems like it must be really easy and I am just missing something I have a project but I accidentally created the sqlite database file in the wrong location. So, all of my project files are in one directory, but, in my home directory I have a file sqlite.db. I just moving that file to where I want it. Then I did: db.connect driver=sqlite database=/NewLocation/test.db Now if I do db.connect -p I see the correct path, but if I try to access a vector that uses that database I get an error "No such table". If I move the file back to the old location then the error goes away, even if I don't use db.connect to point to the other location. So, I am just missing something about how to have grass know the correct location of a database. If I just move the file, how can I get the vector map to "know" the correct file to use, since db.connect is not doing the job? Thanks. --Adam ___ 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] v.what.rast with centroids
Hi Dave, what I did in this case, was, as you said, to convert the centroids to points and then run v.what.rast. One possibility to get the information to your table: 1- Convert the polygons (the categories) to raster with r.to.vect. 2- Do a v.what.rast with this "raster-area" map. 3- Make a table update and use 2- for identifying the right items. I hope you like it, Achim Am 10.06.2010 19:40, schrieb Dave Roberts: Friends, I have an vector area map with numerous polygons with centroids. When I do v.what.rast vector=A raster=B column=C It appears to run, but doesn't actually enter any data into column C in the associated table in Postgres. Reading the help file, I suspect this is because A is an area instead of a point map, but the areas do have centroids which I would expect v.what.rast to employ. I could import the centroids as a separate points map, but then they're not associated with the table in Postgres. What's considered best practices in associating polygon centroids with other rasters or vector areas? Thanks, Dave ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.split length=? in latlon
Am 24.05.2010 23:35, schrieb Markus Neteler: Please open an enhancement report in trac for this. I'll do. Thanks for response, Markus! Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] export as eps/svg ind grass7?
Dear list, I know that it is not possible in grass65, but can one export the graphics display to svg or eps in grass7 (from gui-display)? Alternatively I would like to load my workspace settings to a xmon in order to export from there. Is that possible? (I really dont want to rebuild the layer settings from the shell again ;-) ) Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.split length=? in latlon
Hi, in v.split: I wonder what units are be used as length in a lat-lon environment? Are these degrees? Why isn't there an option for m, km,..? Thanks in advance, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.watershed multi flow direction
Furthermore, in version 6.5 and up r.watershed becomes veryvery fast! Am 21.05.2010 14:05, schrieb M S: I believe that MFD in r.watershed is in versions 6.5 and up. Mark On Fri, May 21, 2010 at 7:27 AM, Kristian Foerster wrote: Hi, I am using GRASS 6.4.0RC5+39438 (downloaded from svn server). I would like to obtain basins and stream segments from digital elevation data using the multi flow option in r.watershed as proposed in the documentation. The installed version of r.watershed obviously doesn't support this feature: Sorry, is not a valid flag Sorry, is not a valid parameter Is there another version of the program available supporting this function? Thank you in advance, best regards, Kristian Förster ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Stream flow direction map
On 01.05.2010 07:46, Jarek Jasiewicz wrote: Interested question, but I think the easiest answer is carving or stream burining (r.stream.carve). Next reproduce r.watershed or r.stream.extract you shall receive (almost) ideally confidential network with supplied HTH Jarek Hi Nikos,Jarek, Stream burning: Thats what I thought about. Further I suggest to weight the DEM with the contour information. A guess how this could be done: v.to.rast contourmap r.fillnulls (to interpolate between contour lines raster map)? r.mapcalc dem*contourrast then r.watershed Best regards, Achim PS: Check the global dataset "HydroSHED"! It uses stream burning and works perfectly (for non profit projects). Its resolution? 3",15",30",5'! I successfully used it to create a global runoff-network for the global runoff model LSDM (Dill 2008). ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] ERROR mapset not found
Could it be that the mapset is locked? If yes, where can I find out and how can I change that? A mapset is locked by creating a ".gislock" file in the mapset directory (note the leading "."). But the error which you report doesn't sound like a locked mapset. right, thats not the problem. It would help if you specified the exact command which you run and the exact error message (copied and pasted, not re-typed) which it generates. here I use the gui: Config -> GRASS working enviroment -> mapset access Are you sure that the directory is actually a mapset, i.e. does it contain the WIND and VAR files? Do these files have the correct ownership and permissions? Yes, I'm sure. >>>>>>>>EDIT>>>>>>>> Now I used the command line: --%<-- g.mapsets addmapset=mapname --%<-- and it worked! But now: the gui doesnt work anymore: --%<-- Traceback (most recent call last): File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 257, in OnMapsets dlg = preferences.MapsetAccess(parent=self, id=wx.ID_ANY) File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/pr eferences.py", line 2137, in __init__ self.mapsetlb.CheckItem(self.all_mapsets.index(mset), True) ValueError : list.index(x): x not in list --%<-- BTW: g.mapsets -s shows the tcltc dialog!? Thats ok for me, because it works, but WHY does this happen? Thanks everyone very much for the hints, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Newbie... Locations, Projections, Regions, choices? (long)
Hi Randy, > I need to create 6 regional maps of the continental U.S., north and > south by west, central, and east. My first thought was to create 7 > locations (one for the entire continental US) but my second thought was > to create just one location with the default region as the entire > continental US and 6 other regions. Is this sound logic? Just a personal suggestion: Here I suggest to create one location with 6 mapsets if you have huge vector maps. You can store the basic data in PERMANENT. Otherwise just create one mapset, make your map and zoom to the areas of interest. Here you can store combination of layers and how they are displayed as "workspaces". > > The map displays fine but I want to change the projection to Albers > Equal Area or Lambert Conformal Conical since it is such a large area. > So I created a new location: aeaConUS with one caveat. It said the > eastern value had to be larger than the western value so I (perhaps > wrongly) used –125 for the western boundary and –67 for the eastern. done well > > When I first try to display this map, nothing is displayed unless I > select “Zoom display to selected map” at which point my nice Albers map This is a problem I have, too. > gets displayed. Or I can “zoom out” about 20 times to make the Albers > map start showing up near the top of the screen. Obviously I’m doing > something wrong here but I’m not sure if its the units (meters vs miles) > or something more fundamental. > I don't know why this happens. Its not the meters-miles thing. Exporting and importing helps, but that's not a real solution. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with v.out.ogr & pgsql
Sometimes GUI output is not like commandline commands have to be. Maybe its just the missing " ". ? v.out.ogr -c input=poly...@mapset type=area dsn=PG:host=localhost dbname=postgis user=users password=users format=PostgreSQL v.out.ogr -c input=poly...@mapset type=area dsn="PG:host=localhost" dbname=postgis user=users password=users format=PostgreSQL ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Newbie... Locations, Projections, Regions, choices? (long)
Hi Randy, I need to create 6 regional maps of the continental U.S., north and south by west, central, and east. My first thought was to create 7 locations (one for the entire continental US) but my second thought was to create just one location with the default region as the entire continental US and 6 other regions. Is this sound logic? Just a personal suggestion: Here I suggest to create one location with 6 mapsets if you have huge vector maps. You can store the basic data in PERMANENT. Otherwise just create one mapset, make your map and zoom to the areas of interest. Here you can store combination of layers and how they are displayed as "workspaces". The map displays fine but I want to change the projection to Albers Equal Area or Lambert Conformal Conical since it is such a large area. So I created a new location: aeaConUS with one caveat. It said the eastern value had to be larger than the western value so I (perhaps wrongly) used –125 for the western boundary and –67 for the eastern. done well When I first try to display this map, nothing is displayed unless I select “Zoom display to selected map” at which point my nice Albers map This is a problem I have, too. gets displayed. Or I can “zoom out” about 20 times to make the Albers map start showing up near the top of the screen. Obviously I’m doing something wrong here but I’m not sure if its the units (meters vs miles) or something more fundamental. I don't know why this happens. Its not the meters-miles thing. Exporting and importing helps, but that's not a real solution. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] ERROR mapset not found
Some more details: I'm using grass65svn, fresh compiled on a kubuntu 64bit. The mapset I cannot access is one of 7. From the one I can connect to the others, but not the other way around. Could it be that the mapset is locked? If yes, where can I find out and how can I change that? The folder has the same permissions as the others. ?? Achim On 30.03.2010 10:37, Achim Kisseler wrote: Hi all, I have a problem with setting the mapset access for one mapset. All other mapsets can be accessed without problems and from different mapsets. I get: --%<-- ERROR mapset not found --%<-- I already checked the folders, but I cannot find any abnormalities. What could it be? Thanks in advance for ideas, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] ERROR mapset not found
Hi all, I have a problem with setting the mapset access for one mapset. All other mapsets can be accessed without problems and from different mapsets. I get: --%<-- ERROR mapset not found --%<-- I already checked the folders, but I cannot find any abnormalities. What could it be? Thanks in advance for ideas, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] error with r.terraflow
Hi, Error: Assertion failed: nrows * ncols == str->stream_len(), file grass2str.h,line 144 This application has requested the Runtime to terminate it in an unusual way. Please contact the application's support team for more information. about the error: I dont know, but: can you give some more information about the data you are using? And: can you post the commands you are used? (You can find the command line equivalent for the gui in the tab "Command Output") Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] trouble with vector works
On 18.03.2010 17:35, sarah moore wrote: To fellow grass gis users: I am having trouble with vector works data going into grass gis. Has anyone else ran into this problem? I have not tried using syntax, instead I used the pull down files: File-Import Vector map-DXF import- resulting in "illegal vector map name". Illegal map name would be one with a "-" e.g. Whats the name you have chosen? File-Import Vector map-import various data using OGR-result"Error .shx file. unable or corrupt:. Sarah Moore Whats the original data type exactly? shape-files shouldnt be a problem with OGR-import. Sometimes I try out QGIS, where importing often works out of the box, but doesnt create the grass stable topology. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: null to equal zero
Hi Gary, > so > r.mapcalc "result=if( isnull(Bones_AVE),0,outputmap)" > > Is that right, no need for A=Bones_AVE? > could the output map be the original? Or does it have to be a new raster? r.mapcalc "result=if( isnull(Bones_AVE),0,Bones_AVE)" and yes, it can be the original r.mapcalc "Bones_AVE=if( isnull(Bones_AVE),0,Bones_AVE)" Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] null to equal zero
r.mapcalc "result=if( isnull(map),0,map)" On 18.03.2010 09:46, Gary Nobles wrote: Hi I have a raster values are: null 1 3 24 27 etc... I need null = 0 As i want to add rasters together so I want to do null=0 I'm sure this is simple Thank you Gary ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Suggestions for backward modelling of a river system
By the way: it depends on the detail! Pre glacial reconstruction of watersheds from isostatical land-level-changes (ger. Ausgleichsbewegungen) were done for noth america. I think it was last year. Regards, Achim On 17.03.2010 22:52, Achim Kisseler wrote: That erosion processes are highly non-linear. Running physical based erosion models in "backwards-mode" is not possible I would bet. I guess one have to work with ground layers, geological land rising and lowering, climatic changes and so on. But well-wrought concept ideas are always welcome. Achim On 17.03.2010 22:12, Maris Nartiss wrote: One can't turn back time, still I also have been thinking about playing with erosion models in backwards mode. If it's possible to calculate current erosion rate and eroded material ammount, it should be possible to add erroded material to DEM, repeat erosion model run on new DEM and in such way back for some K years (runs). It will not take into account all possible events, still for some landscapes it might work rather well (think - no high mountain areas or territories with often landslides etc.). Maris. 2010/3/17, Achim Kisseler: Hi, that mean, as I understand, that you have to have a paleo DEM. You have to ask the question: On what data basis do I want to reconstruct paleo landscape? Geomorphological changes cannot be reconstructed just with a present day DEM. Achim On 17.03.2010 14:21, Marc Stonestreet wrote: Hi all Can anyone suggest a method to backward model a river system's flow path that can integrate with srtm data? I am seeking a way (if possible ) to look back in time at the paleo-course of a river system. I have no doubt that a solution would be a complex undertaking - could anyone advise me on what approach I should adopt at least? I have the srtm data - guess that was the easy part.. now how would I 'age' the data? Regards Marc S___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user 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] Suggestions for backward modelling of a river system
That erosion processes are highly non-linear. Running physical based erosion models in "backwards-mode" is not possible I would bet. I guess one have to work with ground layers, geological land rising and lowering, climatic changes and so on. But well-wrought concept ideas are always welcome. Achim On 17.03.2010 22:12, Maris Nartiss wrote: One can't turn back time, still I also have been thinking about playing with erosion models in backwards mode. If it's possible to calculate current erosion rate and eroded material ammount, it should be possible to add erroded material to DEM, repeat erosion model run on new DEM and in such way back for some K years (runs). It will not take into account all possible events, still for some landscapes it might work rather well (think - no high mountain areas or territories with often landslides etc.). Maris. 2010/3/17, Achim Kisseler: Hi, that mean, as I understand, that you have to have a paleo DEM. You have to ask the question: On what data basis do I want to reconstruct paleo landscape? Geomorphological changes cannot be reconstructed just with a present day DEM. Achim On 17.03.2010 14:21, Marc Stonestreet wrote: Hi all Can anyone suggest a method to backward model a river system's flow path that can integrate with srtm data? I am seeking a way (if possible ) to look back in time at the paleo-course of a river system. I have no doubt that a solution would be a complex undertaking - could anyone advise me on what approach I should adopt at least? I have the srtm data - guess that was the easy part.. now how would I 'age' the data? Regards Marc S___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Suggestions for backward modelling of a river system
Hi, that mean, as I understand, that you have to have a paleo DEM. You have to ask the question: On what data basis do I want to reconstruct paleo landscape? Geomorphological changes cannot be reconstructed just with a present day DEM. Achim On 17.03.2010 14:21, Marc Stonestreet wrote: Hi all Can anyone suggest a method to backward model a river system's flow path that can integrate with srtm data? I am seeking a way (if possible ) to look back in time at the paleo-course of a river system. I have no doubt that a solution would be a complex undertaking - could anyone advise me on what approach I should adopt at least? I have the srtm data - guess that was the easy part.. now how would I 'age' the data? Regards Marc S___ 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] label
Hello Hamish, now it works. Thank you! Explanation: did you set attrcol= to the name of the column containing the text from the Labels tab? yes does disp=cat work? Yes, that works. BUT: I didnt set disp=attr AND attrcol at the same time. Thats what I missed! (What does not work: text labels for line features) --%<-- Error Map<> not found. --%<-- right, that is a bug in the wxGUI. filed in the trac'er as #1014 Good to know...what a pitty.. Hamish Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] problem showing many layers
Hello, I wonder if anyone else has the same problem or if the problem is known: Using wxGUI the monitor has problems with showing all selected layers in the layer list. Very often some are missing. That happens the more often, the more layers are in the list. To handle this, I can change the order of the layers or switch one or many individual layers on off and on again (windows error handling manner). Sometimes it helps, when I set a (raster) layer to another position in the list without changing the order of the selected layer. Thats misterious...and really bugging! Thanks for hints in advance, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] label
Hi Hamish, thanks a lot for reply! display=attr ? thats what I did, but I dont get even simple text Building a label map with v.label and loading it, I get an error: map not found. displaying fancy paint labels is done by d.labels not by d.vect. (third button from right in wxGUI layer manager) Thats what I also did. I find the label layer I generated with v.label. Here I get this error message: --%<-- Error Map <> not found. --%<-- In the past I changed to QGIS for displaying, but I would like to stay in GRASS. It just does not work and I cannot find out, why! Best regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] label
Hi, labeling vectors does not work at my grass 6.5 (kubuntu64bit). All settings in d.vect are accepted, but I see no labels. Building a label map with v.label and loading it, I get an error: map not found. Do I miss a point? Thanks for any help, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing rasters
Hi, can you post the hole command you used? Achim ciccp...@libero.it schrieb: Hi everybody, I am trying to import a raster file that is in a location "SRTM", into another location "LatLong-WGS84" using r.in.gdal I am inside the "LatLong-WGS84" location, and once i imported the file i press the button to get the raster file added in the manager. It seems everything all right, the projections match, but when i try to add the raster file, there's anything in the box, that displays only the "PERMANENT" directory, empty. Many 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] r.mapcalc question
I see, so variables are functions in this case. I've been searching for a while, but I cannot find any tool like grasss r.mapcalc that is a bit more flexible, eg. that can handle recursive tasks. Thanks a lot, Achim Marco Lechner - FOSSGIS e.V. schrieb: Hi Achim, the neighborhood modifier doesn't seem to accept functions (you also could try rand(), ...) Marco Achim Kisseler schrieb: Hello grass-users, I have a problem running a r.mapcalc procedure: given two maps dir_x, dir_y with 0,1,-1 entries I want to run: r.mapcalc "the_map=if(isnull(the_map),the_map[dir_x,dir_y],null())" in order to make a r.water.outlet on many many areas at the same time. The error I get is: syntax error, unexpected NAME, expecting INTEGER or '-' why does dir_x/dir_y does not return an integer here? Using int(dir_x) also does not work. Until now I use a r.mapcalc command with many "if", checking the direction of every pixel every time. But this is quite slow. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.mapcalc question
Hi Christian, thanks for fast reply! I also tried r.mapcalc with eval(), setting variables for dir_x/dir_y. But map[ , ] does not take them with the same error. Looks like I have to find another way to fasten the if-procedure in order to make a r.water.outlet on many many areas at the same time. Cheers, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.mapcalc question
Hello grass-users, I have a problem running a r.mapcalc procedure: given two maps dir_x, dir_y with 0,1,-1 entries I want to run: r.mapcalc "the_map=if(isnull(the_map),the_map[dir_x,dir_y],null())" in order to make a r.water.outlet on many many areas at the same time. The error I get is: syntax error, unexpected NAME, expecting INTEGER or '-' why does dir_x/dir_y does not return an integer here? Using int(dir_x) also does not work. Until now I use a r.mapcalc command with many "if", checking the direction of every pixel every time. But this is quite slow. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] cutting issue (again): r.mapcalc vs. r.resample
And more: -%<-- ...The category values in the new raster output map layer will be the same as those in the original, except that the resolution and extent of the new raster output map layer will match those of the current geographic region settings (see g.region) -%<-- Achim Tim Michelsen schrieb: Hello, I while ago I asked how to cut a small map from a larger one using the region settings as boundary for the small map: http://n2.nabble.com/r-mapcalc-changes-color-table-td4072836.html#a4072836 I tried this again: Approach 1: r.mapcalc r.mapcalc "cut=if(boundary_raster, large_map, null())" Approach 2: r.resample r.resample input=large_map output=cut I notice the that using Approach 2, the areas that was outside the set region is white. The underlayung rasters are not visible (or only if I set the opacity of "cut" to a low value). If I use Approach 1 with r.mapcalc, the areas outside the region are really NULL() (=transparent) and underlaying larger rasters are visible. Only that the result "cut" from r.mapcalc has a new colortable. Am I doing something wrong? Why is the no such command r.cut? Thanks in advance for your help, Timmie ___ 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] cutting issue (again): r.mapcalc vs. r.resample
Did you do: g.copy rast=boundary_raster,MASK or alternatively: r.mask input=boundary_raster -o (-o for overwrite) ? Tim Michelsen schrieb: Hello, I while ago I asked how to cut a small map from a larger one using the region settings as boundary for the small map: http://n2.nabble.com/r-mapcalc-changes-color-table-td4072836.html#a4072836 I tried this again: Approach 1: r.mapcalc r.mapcalc "cut=if(boundary_raster, large_map, null())" Approach 2: r.resample r.resample input=large_map output=cut I notice the that using Approach 2, the areas that was outside the set region is white. The underlayung rasters are not visible (or only if I set the opacity of "cut" to a low value). If I use Approach 1 with r.mapcalc, the areas outside the region are really NULL() (=transparent) and underlaying larger rasters are visible. Only that the result "cut" from r.mapcalc has a new colortable. Am I doing something wrong? Why is the no such command r.cut? Thanks in advance for your help, Timmie ___ 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] Re: i.sunhours
Ah, so maybe you can have different doy on every raster-cell? Generating a map full of 45-integers would give you valentines day hours of sunshine everywhere on the map..., guess. Achim Tim Michelsen schrieb: I guess doy = day of year I thought the same. But the doc is strange: doy=name Name of the doy input map ___ 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] i.sunhours
Hi, I guess doy = day of year lat = latitude While doy in (1-365) And lat in (0-90)? Should be. But why "name"?? Achim Tim Michelsen schrieb: Hello, what do the inputs for i.sunshine in GRASS7 mean? i.sunhours doy=name lat=name Thanks in advance, Timmie ___ 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] GLOBCOVER import and manage
Hi, What you are trying to do is a "on-the-fly projection". GRASS does not do this, because that doesn't work properly (as I understand, but I don't know why). What you have to do is to make another location with the different coordinate system and import your data there. Then go to your location, you want to work with. Here you can use the tool v.proj or r.proj to import your vector or raster data. Have a look at: http://www.grass.itc.it/grass64/manuals/html64_user/v.proj.html or http://www.grass.itc.it/grass64/manuals/html64_user/r.proj.html First of all let me warn you that I'm new at GRASS :) ...keep on. Its worth! Regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Obtaining unique nodes from a topology
Hi Will, I think it is possible: building a network from boundaries with v.net and then using the report option in v.net it is not possible to update the table with these infos, but it is possible to save the results in a list, import this to your database and connect these infos to the table. Achim William Temperley schrieb: Hi Achim Thanks - but what I really want is a list of unique nodes (i.e. where three boundaries meet, there would be one node, with an id) and assign this id to the relevant boundaries. Perhaps that isn't possible. It might be easier to do this in PostGIS. I need to be able to run recursive queries in PostGIS to pick up connected boundaries. Cheers Will 2010/1/15 Achim Kisseler <mailto:a...@jupiter.uni-freiburg.de>> Hi Will, for lines you can use v.to.db -p map=... option=start -p to print your result option=start to get start points option=end to get end points the result looks like cat|x|y|z ... without -p you can upload the results to the table with: columns=x,y(,z) Hope it helps, Achim William Temperley schrieb: Hi all I've used Grass to build a topology out of a polygon shapefile, so far so good. I now need to export it as an arc-node topology (i.e. boundaries with startnode_id, endnode_id) which I will then use in PostGIS. Does anyone know of a way to get the nodes from the topology and attach these attributes to the boundaries? I know I can get the start/end coordinates, but I need the unique nodes and their ids. Thanks Will Temperley ___ grass-user mailing list grass-user@lists.osgeo.org <mailto: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] Obtaining unique nodes from a topology
Hi Will, for lines you can use v.to.db -p map=... option=start -p to print your result option=start to get start points option=end to get end points the result looks like cat|x|y|z ... without -p you can upload the results to the table with: columns=x,y(,z) Hope it helps, Achim William Temperley schrieb: Hi all I've used Grass to build a topology out of a polygon shapefile, so far so good. I now need to export it as an arc-node topology (i.e. boundaries with startnode_id, endnode_id) which I will then use in PostGIS. Does anyone know of a way to get the nodes from the topology and attach these attributes to the boundaries? I know I can get the start/end coordinates, but I need the unique nodes and their ids. Thanks Will Temperley ___ 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] Difference between r.mapcalc and r.mapcalculator
Easy: just run them to get to know them or read the -%<-- DESCRIPTION r.mapcalculator Provides a GUI frontend to r.mapcalc. Up to 5 maps can be combined using simple expressions. Expert mode runs r.mapcalc for more complex expressions. -%<-- Achim Gilbert Ferrara schrieb: Greetings all I found 2 similar functions to perform, what I think, is the same thing: - r.mapcalc - r.mapcalculator What is the main processing difference between them? Thanks Gilbert ___ 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] GRASS Scripting questions
Hi Antonio, itinialization of counter1 r.mapcalc $GIS_OPT_COUNTER1= "float (0)" shouldn't be counter1= GIS_OPT_SOMA The cycle: IFS=, for opt in $GIS_OPT_INPUT; do r.mapcalc $GIS_OPT_SOMA= "$opt+$GIS_OPT_SOMA)" done | | is there a ')' too much? | ? Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] accumulation map from directions map
Hi all, again I reached the point I did half a year ago: jgrass only can handle 'metric' rasters, which means raster-cells of equal sizes, same NS, OW resolution. I work an a latlon-projection and therefore I cannot use jgrass. ? 1 I guess, r.stream cannot handle latlong-projections? ? 2 I guess, r.stream doesn't have something like h.tca? (h.tca: makes an accumulation map from a direction map) ? 3 Is it possible to make the accumulation-values non-integer and weight every grid-cell with its real area size? Then every accumulation value would indicate its basin-size and so on like in eg. lambert projection. What wouldn't work that easy: distances EW and thus angle based calculations, too. Again my old PROBLEM: How to get an accumulation map strickly WITHOUT an DEM from ONLY an direction map on a LAT-LON map? Achim Jarek Jasiewicz schrieb: Markus Neteler pisze: On Thu, Nov 19, 2009 at 2:35 PM, Achim Kisseler wrote: Dear Markus, I follow Silvias suggestion and use h.tca in JGRASS. BTW: Isn't is possible to integrate the horton-tools into grass? If the license is compliant to GPL (I guess so), yes. Hortons tools are available in svn add ons as r.stream.* suite: r.stream.extract, r.stream.order, r.stream.stats etc... see tutorial on grass wiki http://grass.osgeo.org/wiki/R.stream.* Jarek Markus ___ 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] center of gravity: solution
> > beware it will only be "valid" for small ranges of latitude. > > otherwise the weights of the longitudes at high latitudes will > have more weight in the average than they should. > Hi Hamish, yes, you are right. In this case the area had to be projected in a projection, where every raster-cell has the same size. Otherwise a "lat-depending" weighting could help... I will try it soon. Thanks for your comment, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] center of gravity: solution
Hi all, I found a solution for the problem of getting the cog for each area with weight of a value map. Its simply r.stats and one! awk-command. And its quite fast! -%<-- # ## get stats into file r.stats -c -n -g input=$1_areas,$1_values output=temp_stats # eg. # (east north cat val) # 49.26253 -11.9458623936673 14 1 # 49.23753 -11.9541956915396 14 2 # ## calc cog: ## sum coor*value ## devided by ## sum value ## for east and north echo "cat lon lat" > temp_stats2 awk '{a[$3]+=$1*$4; b[$3]+=$4; c[$3]+=$2*$4; d[$3]+=$4} END{for (i in a){print i,a[i]/b[i],c[i]/d[i]}} ' temp_stats >> temp_stats2 -%<-- temp_stats2 looks like cat lon lat 14 49.123 -11.123 15 50.123 -10.123 ... (or whatever) Cheers, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.sum (COG)
Is it possible to run r.sum for many areas AT ONCE? r.sum does it for a whole region (or masked area) like: one raster-map with areas, the other with values to sum? Many thanks, Achim Achim Kisseler schrieb: > Hi all, > > is it possible in grass to calculate the "center of gravity"? > > Given two raster maps: > 1) map where areas are defined (can be vector map, too) > 2) raster map with "gravity" values > > I cannot find something like this in grass. > > Any suggestion welcome, > Achim > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] COG
Hi all, is it possible in grass to calculate the "center of gravity"? Given two raster maps: 1) map where areas are defined (can be vector map, too) 2) raster map with "gravity" values I cannot find something like this in grass. Any suggestion welcome, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] bug?: v.to.db wrong area
I think "v.dissolve" corrupted it. I solved it by making a raster map and then a vector map again. Thanks, Markus and Pablo, Achim Achim Kisseler schrieb: > I made the grid with: > > -%<-- > v.mkgrid --overwrite map=$1_grid_all grid="$north_south,$east_west" > position=coor coor="$southwest_corner" box="0:30,0:30" > > echo " > > ## shrink grid to land-surface" > sqlite3 $2 "drop table $1_grid_patched" > v.overlay --o ainput=$1_grid_all binput=$1_area output=$1_grid_patched > v.db.addcol map=$1_grid_patched columns="keep INT" > sqlite3 $2 "UPDATE $1_grid_patched SET keep=1 WHERE (NOT b_cat IS NULL > OR ((a_row*1000)+a_col) IN (SELECT (a_row*1000)+a_col FROM > $1_grid_patched WHERE NOT b_cat IS NULL))" > v.extract input=$1_grid_patched output=$1_grid_extracted where="keep=1" > --overwrite > v.db.addcol map=$1_grid_extracted columns="dissolve INT" > sqlite3 $2 "UPDATE $1_grid_extracted SET dissolve=((a_row*1000)+a_col)" > v.dissolve --overwrite input=$1_grid_extracted output=$1_grid > column=dissolve layer=1 > > (...) > > sh renew_cats.sh $1_grid 2 centroid > db.droptable -f table=$1_grid > v.db.connect -d map=$1_grid > v.db.addtable map=$1_grid > -%<-- > > In the picture: > yellow grids seem ok (301.444-279.003 km²) > one is 194.532 > the rest is 2.545.231-11.559.210 > > Achim > > > > Pablo Carreira schrieb: >> Achim, how was the grid generated? Could you put some fo the results here? >> >> >> Pablo. >> >> >>> Date: Mon, 7 Dec 2009 18:32:14 +0100 >>> From: a...@jupiter.uni-freiburg.de >>> To: markus.metz.gisw...@googlemail.com >>> Subject: Re: [GRASS-user] bug?: v.to.db wrong area >>> CC: grass-user@lists.osgeo.org >>> >>> Hi Markus, >>> >>> its the same with hectares; kilometers writes out the result in >>> square-kilometers. >>> >>> Achim >>> >>> Markus Metz schrieb: >>>> Achim Kisseler wrote: >>>>> Hi, >>>>> >>>>> I am using >>>>> >>>>> v.to.db map=af_grid option=area columns=area type=centroid >>>>> units=kilometers >>>>> >>>> try units=hectares, kilometers are not an areal unit, don't know why >>>> v.to.db executes at all >>>> >>>> you can cross-check the results by querying the map >>>> >>>> hope that helps, >>>> >>>> Markus M >>>> >>>>> (in GRASS65 opensuse 11.1 64) >>>>> >>>>> to calculate the area size. Some of the areas are very wrong. Its a >> grid >>>>> in lat-lon, where areas should be nearly equal in size. >>>>> >>>>> Is this a known bug? I don't guess so. >>>>> Do I something wrong? >>>>> >>>>> Thanks, >>>>> Achim >>>>> >>>>> PS: >>>>> already did v.clean, r.mask -r (<- should not be have an effect) >>>>> ___ >>>>> 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 >> >> Agora a pressa é amiga da perfeição. Chegou Windows 7. Conheça. >> <http://www.microsoft.com/brasil/windows7/default.html?WT.mc_id=1539> >> >> >> >> >> >> >> ___ >> 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] Help starting grass for first time
Yes, this is quite tricky... Have you seen the literature on eg. http://www.gdf-hannover.de/media.php?id=0&lg=en ? Try the spearfish dataset to get an idea, how to begin. Achim Ross Benisch schrieb: > Hi, I have downloaded and unzip all the data for the 6.4 version of > grass for windows vista and I can not get the program to run. I try and > set the projection and all i get is an error. If someone would > describe the process of how to start grass for the first time for my > setup, I would greatly appreciate it because it is very frustrating to > not even be able to open the software I want to start using it. I have > tried all of the help and start up guides and they are not solving the > problem. Please help. > > Ross > > > Windows Live Hotmail gives you a free,exclusive gift. Click here to > download. > <http://www.microsoft.com/windows/windowslive/hotmail_bl1/hotmail_bl1.aspx?ocid=PID23879::T:WLMTAGL:ON:WL:en-ww:WM_IMHM_7:092009> > > > > > ___ > 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] v.what.rast for lines
Hi Jitu, a way would be to convert the lines to raster (v.to.rast) and calculate the statistics (r.stats). As every line has a unique id, the "raster-lines" will have. Hope it helps, Achim Jitendra Kumar schrieb: > Hi, > "v.what.rast" allows to extract the values from the raster at the vector > points. How to do a similar operation for a vector map consisting of > lines instead of points. I have road network as vector and I wish to > extract the average value over each line segment from a raster. > > I thought of several options but had one or other conceptual problem. I > can convert the vector line to points using "v.to.points" and extract > the values at each point using "v.what.rast". But I am not sure how to > identify the points lying on a particular line in order calculate the > average over the line. > I do want to preserve the lines in my road network vector data since it > gets used in some other network analysis as well. > > If I have several attributes associated with my raster, how to specify > the attribute to be extracted to "v.what.rast" ? > > I am quite confused as to how to do this. Any pointers would be of great > help? > > Thanks, > Jitu > > > > > ___ > 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] bug?: v.to.db wrong area
I made the grid with: -%<-- v.mkgrid --overwrite map=$1_grid_all grid="$north_south,$east_west" position=coor coor="$southwest_corner" box="0:30,0:30" echo " ## shrink grid to land-surface" sqlite3 $2 "drop table $1_grid_patched" v.overlay --o ainput=$1_grid_all binput=$1_area output=$1_grid_patched v.db.addcol map=$1_grid_patched columns="keep INT" sqlite3 $2 "UPDATE $1_grid_patched SET keep=1 WHERE (NOT b_cat IS NULL OR ((a_row*1000)+a_col) IN (SELECT (a_row*1000)+a_col FROM $1_grid_patched WHERE NOT b_cat IS NULL))" v.extract input=$1_grid_patched output=$1_grid_extracted where="keep=1" --overwrite v.db.addcol map=$1_grid_extracted columns="dissolve INT" sqlite3 $2 "UPDATE $1_grid_extracted SET dissolve=((a_row*1000)+a_col)" v.dissolve --overwrite input=$1_grid_extracted output=$1_grid column=dissolve layer=1 (...) sh renew_cats.sh $1_grid 2 centroid db.droptable -f table=$1_grid v.db.connect -d map=$1_grid v.db.addtable map=$1_grid -%<-- In the picture: yellow grids seem ok (301.444-279.003 km²) one is 194.532 the rest is 2.545.231-11.559.210 Achim Pablo Carreira schrieb: > Achim, how was the grid generated? Could you put some fo the results here? > > > Pablo. > > >> Date: Mon, 7 Dec 2009 18:32:14 +0100 >> From: a...@jupiter.uni-freiburg.de >> To: markus.metz.gisw...@googlemail.com >> Subject: Re: [GRASS-user] bug?: v.to.db wrong area >> CC: grass-user@lists.osgeo.org >> >> Hi Markus, >> >> its the same with hectares; kilometers writes out the result in >> square-kilometers. >> >> Achim >> >> Markus Metz schrieb: >> > >> > Achim Kisseler wrote: >> >> Hi, >> >> >> >> I am using >> >> >> >> v.to.db map=af_grid option=area columns=area type=centroid >> >> units=kilometers >> >> >> > try units=hectares, kilometers are not an areal unit, don't know why >> > v.to.db executes at all >> > >> > you can cross-check the results by querying the map >> > >> > hope that helps, >> > >> > Markus M >> > >> >> (in GRASS65 opensuse 11.1 64) >> >> >> >> to calculate the area size. Some of the areas are very wrong. Its a > grid >> >> in lat-lon, where areas should be nearly equal in size. >> >> >> >> Is this a known bug? I don't guess so. >> >> Do I something wrong? >> >> >> >> Thanks, >> >> Achim >> >> >> >> PS: >> >> already did v.clean, r.mask -r (<- should not be have an effect) >> >> ___ >> >> 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 > > > Agora a pressa é amiga da perfeição. Chegou Windows 7. Conheça. > <http://www.microsoft.com/brasil/windows7/default.html?WT.mc_id=1539> <>___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] bug?: v.to.db wrong area
Hi Markus, its the same with hectares; kilometers writes out the result in square-kilometers. Achim Markus Metz schrieb: > > Achim Kisseler wrote: >> Hi, >> >> I am using >> >> v.to.db map=af_grid option=area columns=area type=centroid >> units=kilometers >> > try units=hectares, kilometers are not an areal unit, don't know why > v.to.db executes at all > > you can cross-check the results by querying the map > > hope that helps, > > Markus M > >> (in GRASS65 opensuse 11.1 64) >> >> to calculate the area size. Some of the areas are very wrong. Its a grid >> in lat-lon, where areas should be nearly equal in size. >> >> Is this a known bug? I don't guess so. >> Do I something wrong? >> >> Thanks, >> Achim >> >> PS: >> already did v.clean, r.mask -r (<- should not be have an effect) >> ___ >> grass-user mailing list >> grass-user@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-user >> >> ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] bug?: v.to.db wrong area
Hi, I am using v.to.db map=af_grid option=area columns=area type=centroid units=kilometers (in GRASS65 opensuse 11.1 64) to calculate the area size. Some of the areas are very wrong. Its a grid in lat-lon, where areas should be nearly equal in size. Is this a known bug? I don't guess so. Do I something wrong? Thanks, Achim PS: already did v.clean, r.mask -r (<- should not be have an effect) ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.coin (r.report,r.stat) -> table
Hi all, I wrote an awk-sed-script (for my specific situation) to do it... Afterwards I recognized, that it is now general enough. So I used a combination of r.mapcalc "preprocessing" and r.stats and combined the result within the database. All the best, Achim Achim Kisseler schrieb: > Moin grass-user, > > I'd like to get the result of r.coin into a table-format to import it in > a database. Before I start fighting with sed and awk: > Do someone know a faster way? > > Thanks in advance, > Achim > > > PS: > Also r.report or r.stat would work, but r.coin most looks like a table > > it looks like: > (..header...) > | cat# | 1 | 2 | 3 | 4 | 6 | >9 | w cat 0 | w/o cat 0 | > || > |a -161 | 3.26 | 0.00 | 0.00 |735.20 | 0.00 > | 0.00 |738.46 |738.46 | > |f -125 | 6.50 | 0.00 | 0.00 | 0.00 | 0.00 > | 0.00 | 6.50 | 6.50 | > |_ -109 | 0.82 | 0.00 | 0.00 | 0.00 | 0.00 > | 0.00 | 0.82 | 0.82 | > |b -107 | 0.00 | 0.00 | 19.12 | 0.00 | 0.00 > | 0.00 | 19.12 | 19.12 | > |a -105 | 0.00 | 0.00 | 6.36 | 0.00 | 0.00 > | 0.00 | 6.36 | 6.36 | > (...) > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.coin (r.report,r.stat) -> table
Moin grass-user, I'd like to get the result of r.coin into a table-format to import it in a database. Before I start fighting with sed and awk: Do someone know a faster way? Thanks in advance, Achim PS: Also r.report or r.stat would work, but r.coin most looks like a table it looks like: (..header...) | cat# | 1 | 2 | 3 | 4 | 6 | 9 | w cat 0 | w/o cat 0 | || |a -161 | 3.26 | 0.00 | 0.00 |735.20 | 0.00 | 0.00 |738.46 |738.46 | |f -125 | 6.50 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 6.50 | 6.50 | |_ -109 | 0.82 | 0.00 | 0.00 | 0.00 | 0.00 | 0.00 | 0.82 | 0.82 | |b -107 | 0.00 | 0.00 | 19.12 | 0.00 | 0.00 | 0.00 | 19.12 | 19.12 | |a -105 | 0.00 | 0.00 | 6.36 | 0.00 | 0.00 | 0.00 | 6.36 | 6.36 | (...) ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Piping Commands
Easiest way: don't pipe! Just make a new vectormap from v.extract and buffer that. (I dont think piping is possible here and v.buffer cannot be restricted on a selection) Achim Pablo Carreira schrieb: > > Hi, > > I want to do the following: > v.extract some lines from a vector and them > v.buffer those lines > > How do I pipe these commands? > > > > > > Pablo Torres Carreira > > > > Chegou o Windows 7: Incrivelmente simples! Clique e conheça. > <http://www.microsoft.com/brasil/windows7/default.html?WT.mc_id=1539> > > > > > ___ > 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] computation in a location based on infos from another location
Hi, > use r.to.vect to map every cell to a polygon, project it to the lambert > map, do the calculation on the polygon, reproject it back to the you dont need to project it to lambert: just run v.to.db -p option=area map=... then you get the size for every lines cell. To get the raster-map: r.mapcalc "ns_col=if(col()==1 , row() , null())" Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] computation in a location based on infos from another location
Once I was in the same situation. Lambert projection is good for some analyzes, because of the equal size of the grid cells. To get the size of the grid cells, you could convert a N-S row of the rastermap into vector polygons and get the size. Not a very direct way, but it sould work. Achim Patrice Dumas schrieb: > On Thu, Nov 19, 2009 at 01:17:13PM +0100, Achim Kisseler wrote: >> Hi, >> >> why dont you import one map from one location to another? Some >> information will be lost, that would be the same like r.resamp.stats. >> >> http://grass.itc.it/grass64/manuals/html64_user/r.proj.html > > Problem is that the information I want is the size and location of the > cell, and this is lost when doing r.proj. > > I could label cells before doing the projection, use a mask for each cell > for r.resamp.stats and reproject back, but this seems very complicated. > > -- > Pat > ___ > 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] accumulation map from directions map
Dear Markus, I follow Silvias suggestion and use h.tca in JGRASS. BTW: Isn't is possible to integrate the horton-tools into grass? Thanks, Achim Markus Neteler schrieb: > 2009/11/19 Achim Kisseler : >> Thanks, Jaroslaw for response, >> >>> there shoud be no problem if you have oryginal DEM >> I know, but I do NOT have the DEM. Thats the problem. > > > Ah, now I understand "is there a way in GRASS to build an > accumulation map from a directions map without a dem map?" > > So: If you are on earth, you can get it here (mars/moon should be also > available somewhere :-): > > http://grass.osgeo.org/wiki/Global_datasets > - SRTM > - ASTER GDEM > > especially > http://grass.osgeo.org/wiki/ASTER_topography > > If you need to start from the accumulation map and no way to > use a DEM, then I have no idea (but see the other comments) > > Hope this helps, > Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] accumulation map from directions map
Hi Silvia, thank you very much. I will use h.tca from JGRASS to get the desired. Best, Achim Silvia Franceschi schrieb: > Hi Achim, > if you are trying to use an open source GIS for hydrological > applications consider to take a look at JGrass. There are a lot of > geomorphological modules. > > Best regards > > Silvia > >> Hello again, >> >> I am still searching a method to generate a flow accumulation map from a >> flow direction map. >> >> I got the direction map from an arcgis user. In arcgis the module >> "FLOWACCUMULATION(FLOW_DIR)" would do this, but I want to use an open >> source solution. >> >> If anyone could give me a hint, where I could find a tool like this >> (inside GRASS it does not seem to be possible), I would be very grateful. >> >> Best regards, >> Achim >> ___ >> 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] accumulation map from directions map
Thanks, Jaroslaw for response, > there shoud be no problem if you have oryginal DEM I know, but I do NOT have the DEM. Thats the problem. Achim Jarosław Jasiewicz schrieb: > Achim Kisseler pisze: >> Hello again, >> >> I am still searching a method to generate a flow accumulation map from a >> flow direction map. >> >> I got the direction map from an arcgis user. In arcgis the module >> "FLOWACCUMULATION(FLOW_DIR)" would do this, but I want to use an open >> source solution. >> >> If anyone could give me a hint, where I could find a tool like this >> (inside GRASS it does not seem to be possible), I would be very grateful. >> >> Best regards, >> Achim >> ___ >> 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] computation in a location based on infos from another location
Hi, why dont you import one map from one location to another? Some information will be lost, that would be the same like r.resamp.stats. http://grass.itc.it/grass64/manuals/html64_user/r.proj.html Achim Patrice Dumas schrieb: > Hello, > > I have 2 locations, one with a lambert projection with a 1 km grid > (comes from hydro1k), covering africa, and the other with a longitude latitude > projection with a 0.5 decimal degrees grid (covering the world). I have a > raster map on the lambert location that has values of 1 for a given area and > 0 (or null) otherwise (corresponds with upstream basins) and I would like to > compute the corresponding area covered on the lonlat grid. This would lead > to a value for each cell in the lonlat grid corresponding with the fraction > of the grid cell covered by 1 in the lambert map. So, for example, if the > cell is completly in the area in the lambert map, the value in the lonlat map > should be 1, and if half of the area of the cell from the lonlat map > is covered by ones in the lambert map, the value in the lonlat map should > be 0.5. > > If the two maps were in the same location, I could set the region > to be the one of the lonlat map, and do > > r.resamp.stats -w input=lambert_map output=fraction_covered > > But r.resamp.stats doesn't work with maps from different locations. > And it seems to me that r.proj forgets the information about the > initial grid although in this case it should be kept. > > I have read the manual pages and the wiki but couldn't find anything > answering my question, except that it seems to be something uneasy to > do in grass, since operations on different locations cannot be done in order > to avoid losses of accuracy: > http://grass.osgeo.org/wiki/Location_and_Mapsets > > I may be wrong, but it seems to me that this kind of use of ratios to > interpolate from a grid to another would be something that is done > regularly, and I guess that other kind of computations requiring > that geographic informations are not lost for each map would also > be useful. > > -- > Pat > ___ > 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] accumulation map from directions map
Hello again, I am still searching a method to generate a flow accumulation map from a flow direction map. I got the direction map from an arcgis user. In arcgis the module "FLOWACCUMULATION(FLOW_DIR)" would do this, but I want to use an open source solution. If anyone could give me a hint, where I could find a tool like this (inside GRASS it does not seem to be possible), I would be very grateful. Best regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] accumulation map from directions map
Hi, is there a way in GRASS to build an accumulation map from a directions map without a dem map? Best regards, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Stranges things after importing a shapefile
Hi, I guess the broken areas in the grass topology have dangles inside. (zoom a broken area) use v.clean: -remove small areas and angles -delete dangles Hope it helps, Achim Νίκος Αλεξανδρής schrieb: > Felix Schalck wrote: >> While still working on my huge map of Europe, I've noticed many >> differences between the original shapefile and the grass vector layer >> created after import. > > This (probably) means that grass (i.e. v.clean) did its job and > corrected topological errors in the shapefile (?). > >> To visualize the problem, I took two >> Screenshots: >> -First one is from gqis 1.01, showing the raw >> shapefile: >> http://img214.imageshack.us/img214/4884/qgis.png >> -Second one from grass 6.4RC5, showing the imported vector >> layer: >> http://img4.imageshack.us/img4/8462/grassgis.png >> Notice how many areas seem broken in the grass layer, and how >> entire parts of large rivers (take the rhine, for an example) are >> missing. > > Not so easy to see the differences. Maybe you could (next time) > highlight them somehow. > >> The initial shapefile was patched together (from a few hundred nasa >> swbd tiles) using Markus Neteler's script (Thanks again Markus !), and >> seem to produce good results, at least in Qgis. The import command I >> used was: v.in.ogr -z -o dsn=/DATA/swbd/shp/tiles/coastlines.shp >> output=coastlines I somehow had to override the projection, because >> grass doesn't seem to recognize the projection of the shapefile - >> although both are of the same WSG84 LAT/LON proj. >> >> My question is: what went wrong ? > > Maybe nothing went wrong ;-). Check the original shape(s) there where > you can locate differences. Are there open polygons for example? > >> Perhaps there is an import step I'm >> missing, since once the 'clean' command finishes, I get an awful lot >> of areas without a centroid; I don't know. But it would be nice, for >> sure, if grass could just translate the shapefile, as it is, and allow >> me to export a *complete* vector map to inkscape. > > If its only for visualisation purposes, I think you can avoid v.clean. > Use: v.in.ogr with the flag "-c Do not clean polygons (not > recommended)". > > Or maybe v.external? > > Nikos > > ___ > 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] v.to.rast with empty vector-file
Thanks for response, Markus! I just did that a minute ago. But I found out that I don't have to handle that exception in my case: I do a r.patch further on, which works even if one raster-file is missing. So there is no need of an null-map anymore. Thanks again, Achim Markus Metz schrieb: > > Achim Kisseler wrote: >> Dear grass users, >> >> has anyone an idea how to handle v.to.rast, if vector-file is empty? -> >> it produces an error and no map is created: >> >> Loading data... >> ERROR: Database connection not defined for layer 2 >> >> I want an null-raster-map instead. >> > r.mapcalc "nullmap = null()" > > ??? > > Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] v.to.rast with empty vector-file
Dear grass users, has anyone an idea how to handle v.to.rast, if vector-file is empty? -> it produces an error and no map is created: Loading data... ERROR: Database connection not defined for layer 2 I want an null-raster-map instead. I created the empty vector map with v.extract (in an script) Thanks, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basins.fill usage
> Based on this excerpt from the manual, it seems the main > external/perimeter watershed boundary, as well as the internal ridges > need inputted? "The raster map layer depicting ridges should include > the ridge which defines the perimeter of the watershed. The coded > stream network can be generated as part of the r.watershed program, > but the map layer of ridges will need to be created by hand" > > My question is really about the need to manually digitize ridges > inside the watershed boundary delineated by r.watershed. As opposed > to running r.watershed with a smaller threshold to get these smaller > basin delineations within a given study area. > > If one has to manually digitize the internal ridges in a watershed, I > wondered what the point of the module was. It obviously has > application, but it seems I am missing something obvious. > > Hope that is more clear. Now its much clearer to me. Thanks. In my opinion the description ao r.basins.fill is now very detailed. I don't really understand it. So maybe someone else can help and maybe we could find out and enhance the description: I think this one: "r.basins.fill generates a raster map layer depicting subbasins, based on input raster map layers for the coded stream network (where each channel segment has been "coded" with a unique category value).." is clear. Input is: raster map X from "r.watershed stream=X" Not clear to me is: "...and for the ridges within a given watershed." which is explained as: "The raster map layer depicting ridges should include the ridge which defines the perimeter of the watershed." What should the parameter mean? How should that be stored in a raster-map? So try out: -> take the stream-network and run r.mapcalc: r.mapcalc "perimeter=if(X,5,null)" Resulting map is a rastermap with value 5, where stream-network is not null. The five is raster-cells or map units or what else? -> run r.basins.fill with that and see what happens. I guess: from each network-segment the subbasin is created which has a minimum distance of 5 (cells?) to the stream. So its something like a buffer. ...in contrast to: "...but the map layer of ridges will need to be created by hand (for example, through digitizing done in v.digit)" => the ridges-map here is a vector-file! Achim PS: --%<-- DESCRIPTION r.basins.fill generates a raster map layer depicting subbasins, based on input raster map layers for the coded stream network (where each channel segment has been "coded" with a unique category value) and for the ridges within a given watershed. The raster map layer depicting ridges should include the ridge which defines the perimeter of the watershed. The coded stream network can be generated as part of the r.watershed program, but the map layer of ridges will need to be created by hand (for example, through digitizing done in v.digit). The resulting output raster map layer will code the subbasins with category values matching those of the channel segments passing through them. A user-supplied number of passes through the data is made in an attempt to fill in these subbasins. If the resulting map layer from this program appears to have holes within a subbasin, the program should be rerun with a higher number of passes. --%<-- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basins.fill usage
> The man page seems to imply that internal divided need digitized? Sorry, again I didn't get the point. Can you explain a bit more detailed, please? Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.basins.fill usage
I'm not sure if I understood you right: the border of a watershed is unique, if you see the basin starting from outlet of a river into the ocean. But there are unlimited subbasins (up to the resolution of the raster)! So you have to define a characteristic for the watersheds, eg. a basin size from the threshold of r.watershed. Greets, Achim M S schrieb: > Upon first glance, r.basins.fill seems like a great tool to generate > subbasins within a watershed. Although I must not be understanding > something obvious and essential. > > If one has to digitize in the internal ridges in a given watershed, > why run the ridge input through the module if one has essentially just > delineated the subbasins ridges? > > Is there an advantage to using a smaller threshold on r.watershed to > get smaller basin delineations (ceasing when thin strip basins get > introduced)? > > Thanks for any feedback, > Mark > ___ > 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] v.to.rast with text column
Hi Dylan, v.to.rast has the option: --%<-- labelcolumn=name Name of column used as raster category labels --%<-- And the raster values have to be numeric: --%<-- column=name Name of column for attr parameter (data type must be numeric) --%<-- (http://grass.itc.it/grass64/manuals/html64_user/v.to.rast.html) Try to make unique numbers from your string-column and convert them with column=... and labelcolumn... Achim Dylan Beaudette schrieb: > Hi, > > v.to.rast is letting me know that it does not accept text columns in an > attribute table. Has anyone figured out a simple approach to making this > work? I suppose that I could import the data into R, convert to factors, save > the levels back to the table and use those... but there may be something out > there that is simpler and can be done within GRASS. Also, would this be > something worth adding to the v.to.rast code? > > Cheers, > Dylan > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] measure distance
Hi, I did it the long-way. Here you are (here I am): -defining, whats the "next" polygon -updating table with coordinates of centroids -and the centroids of the next -writing these informations and cats number out -building standard-ascii-lines-import file with a bit of awk -import that -building table (with stored category-numbers) -adding column "length" -v.to.db option=length -update original table Achim Achim Kisseler schrieb: > Hi grass-users, > > I am going to measure the distance from one centroid to another for many > polygons in a layer in order to update the table with the distance. > > What would be a way? The only I can imagine so far is: > - collecting coordinates > - building lines from them > - update length of lines > - update old table > > Is there another, better and faster way? Shouldn't be measuring of > distances a common tool? Do I just don't find it? Do I understand > v.distance wrong (it just returns the cat of the nearest feature)? > > Achim > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] measure distance
Hi grass-users, I am going to measure the distance from one centroid to another for many polygons in a layer in order to update the table with the distance. What would be a way? The only I can imagine so far is: - collecting coordinates - building lines from them - update length of lines - update old table Is there another, better and faster way? Shouldn't be measuring of distances a common tool? Do I just don't find it? Do I understand v.distance wrong (it just returns the cat of the nearest feature)? Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] negative categories?
Hi Hamish, thanks! I did like you said and it works fine. Because the database (sqlite) has its own ids, it can handle the grass internal cats even when they are negative. Multiplying forward and backward let me identify old numbers. I was a bit afraid, that the numbers result are to hight, because I used three different kinds of objects coded as positive, negative and negative multiplied with 10. Achim Hamish schrieb: > Achim wrote: >> from a raster map I get vector polygons with r.to.vect. >> As I use the -v flag, I get one category-number for each >> value. This is what I want. >> >> My problem: v.to.db does not update negative cats! Is there >> any way to handle this? >> >> I dont want to loose the identification, nor miss the -v Flag: Having >> raster-values in a column "value" is not clean, due to the fact, that I >> have eg. to remove small trapped cells, calc center of gravity and more. > > > the key column ID is meant to be a positive number. attribute columns can > be whatever you like. > > You can keep a form of the number positive with r.mapcalc, e.g.: > > > r.mapcalc "pos_map = if( orig_map <= 0, 10 - orig_map, orig_map )" > > > then -5 becomes 15, etc. > > > some SQL magic can add a new column for the vector map and repopulate it > with the original +/- values. > > > Hamish > > > > > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] buffer question
Here I tried a bit and it seems, that v.buffer works for whole geometry, not for each part (like each line segment gets its own area). So there is no direct way, as I can find out. ...some missing feature! ..doing it for each extracted line and patch them together would be a workoround here... Achim Giovanni Manghi schrieb: > On Fri, 2009-10-09 at 19:32 +0200, Achim Kisseler wrote: >> It seems, that there are line-segments and a buffer is made for each. Do >> you mean that? > > > > yes, I meant that > > > cheers > > -- Giovanni -- > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] buffer question
It seems, that there are line-segments and a buffer is made for each. Do you mean that? Otherwise check: http://grass.itc.it/grass64/manuals/html64_user/v.buffer.html eg. v.buffer input=map output=buffer type=line distance=100 Flags: -s Make outside corners straight -c Don't make caps at the ends of polylines Cheers, Achim Giovanni Manghi schrieb: > Hi all, > > a friend is asking me if there is a straight way in GRASS to make a > buffer like the one represented in this arcgis screenshot > > http://evora.sigaberto.org/downloads/buffer.jpg > > the buffer would be calculated along a line splitted with v.split > > thanks in advance > > -- Giovanni -- > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] negative categories?
Hi, from a raster map I get vector polygons with r.to.vect. As I use the -v flag, I get one category-number for each value. This is what I want. My problem: v.to.db does not update negative cats! Is there any way to handle this? I dont want to loose the identification, nor miss the -v Flag: Having raster-values in a column "value" is not clean, due to the fact, that I have eg. to remove small trapped cells, calc center of gravity and more. Thanks, Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Bug or feature? v.net.alloc
Hi Christian, I wished to have this as an option... I had exactly the same problem some month ago. Now we are two, it becomes a bigger wish ;) > So, it is a feature of v.net.alloc that v.db.addtable isn't done > automatically for resulting data set? So: Its neither a bug nor a feature. Its a missing option. Achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Bug or feature? v.net.alloc
Hi, there are three levels you have to think of: first level: geometry; every geometry element has an id number second level: category; category numbers can point to one or many geometry ids third level: database; in tables feature information is stored; every geometry(group) with a category can be addressed by the same (unique) numbers in a table with column 'cat' Its not enough just to make new categories. You have to create the table with: db.droptable -f table=yourtable ##if already one exists v.db.connect -d map=yourtablesmap ##if you want to delete old connections v.db.addtable map=yourtablesmap ##automatically columns="cat INTEGER" will be ran and each category of the map gets an entry; default is layer=1, so categories for layer one will be made; the tables name will be "yourtablesmap"; for layer=2 "yourtablesmap_2"... Greets, Achim PS: little script to renew categories --%<-- ## INPUT: ## $1 vector map with changed features ## $2 layer of changed features ## $3 type of features to change (line,point,boundary,...) v.category input=$1 output=$1_nocat option=del type=$3 layer=$2 --o v.category input=$1_nocat output=$1 type=$3 layer=$2 --o --%<-- Christian Braun schrieb: > Hi all, > > I am using v.net.alloc to create 'catchments' for traffic stations. > Working flawlessly so far... > I see categories with 'v.category resultmap option=report' and it > visualizes also the resultmap with categories. > > But if I do a v.info -c on the resultmap I get a warming that no DB > connection is defined. This is the part where I miss the 'new' > information. If I want to go on working with the newly defined > 'catchments' I have to export them as Shape or something else and > reimport it again to have the cats in the table. > Is this foreseen like that? > > cheers > Christian > > > Dipl. Geogr. Christian Braun > Tel: +352- 425991-608 > Mobil: +49-179-6845896 > Mail: christian.br...@tudor.lu > > Resource Centre for Environmental Technologies, > Public Research Centre Henri Tudor, > Technoport Schlassgoart, > 66 rue de Luxembourg, > P.O. BOX 144, > L-4002 Esch-sur-Alzette, Luxembourg > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] thresh in v.select?
Hi all, I report again a rounding problem, wondering why no one else seems to have such problems. Maybe someone con give me an good advice? This time problem (see picture): I have areas and lines and I want to remove the lines inside the areas- I did: -boundaries to lines ("arealines") -patch lines and arealines -break where they cross -v.select -r -g operator=within that should do, but due to ?roundings?, v.select does not do it correct...(see picture) I would need a thresh in v.select, I guess, hoping you might have an idea how to deal with it. v.clean with snap does not work, because how can I tell the nodes at line ends to snap to area boundaries. Thank a lot in advance, Achim <>___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user