Re: [GRASS-user] Determining number of overlapping features per location after import of shape file
On Mon, Jun 23, 2008 at 9:08 PM, Markus Neteler <[EMAIL PROTECTED]> wrote: > Rainer, > > I suggest to try the snap parameters of v.in.ogr first. Maybe the SHAPE > file is full of gaps and slivers (commonly found, even in governmental > data). > *Small* snapping values might cure it. Be careful to not snap, say, > Africa to a triangle :) > > Markus Thanks Markus, but the information is there. If I display the layer and select layer=2, I see the overlapping areas, and if I click i=on them to get information (v.what -a [EMAIL PROTECTED] ...), I get the following info: East: 255207.46888 North: 6235456.43154 Map: fireHistory Mapset: simulation Type: Centroid Line: 3202 Layer: 1 Category: 4 Driver: dbf Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/ Table: fireHistory Key column: cat cat : 4 YEAR : 2005 Layer: 1 Category: 178 Driver: dbf Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/ Table: fireHistory Key column: cat cat : 178 YEAR : 1993 Layer: 1 Category: 208 Driver: dbf Database: /home/rkrug/Documents/Projects/AlienSpread/R/../grass/simulation/dbf/ Table: fireHistory Key column: cat cat : 208 YEAR : 1995 Layer: 2 Category: 3 <<--- and the one value marked by <<-- is the one which IO want to extract into a raster or vector map. Even if I do v.extract [EMAIL PROTECTED] output=fires type=point,line,boundary,area layer=2 it gives me the areas, but no associated attribute table. > > On Mon, Jun 23, 2008 at 12:13 PM, Rainer M Krug <[EMAIL PROTECTED]> wrote: >> >> Hi >> >> I am importing a vector layer from a shape file as follow, and get the >> warning below: >> >> > v.in.ogr dsn=/home/rkrug/Documents/Projects/AlienSpread/data/input/ >> > layer=fireHistory output=fireHistory --overwrite >> >> >> WARNING: 703 areas represent more (overlapping) features, because polygons >> overlap in input layer(s). Such areas are linked to more than 1 >> row in attribute table. The number of features for those areas is >> stored as category in layer 2 >> >> >> I am aware of that, and I want to create a raster layer with the >> number of features overlapping in each location. As I ultimately need >> a raster layer, I thought to use the following, but I get the error >> message below: >> >> > v.to.rast input=fireHistory layer=2 output=mf use=attr column=category >> > --overwrite >> >> ERROR: Unable to get layer info for vector map >> >> Why is that? >> >> Is there another way of getting the number of overlapping features per >> cell? >> >> Thanks >> >> Rainer >> >> >> -- >> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation >> Biology, UCT), Dipl. Phys. (Germany) >> >> Plant Conservation Unit >> Department of Botany >> University of Cape Town >> Rondebosch 7701 >> South Africa >> ___ >> grass-user mailing list >> grass-user@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/grass-user > > > > -- > Open Source Geospatial Foundation > http://www.osgeo.org/ > http://www.grassbook.org/ -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Determining number of overlapping features per location after import of shape file
> Is there another way of getting the number of overlapping features > per cell? Hi, maybe this helps- you can try Radim's example from the vector screenshots page. (see GRASS 6.0 "Overlapping polygons" section) http://grass.osgeo.org/screenshots/vector.php Yes, funny place for tutorial material, but it demos some functionality. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Determining number of overlapping features per location after import of shape file
On Tue, Jun 24, 2008 at 9:57 AM, Hamish <[EMAIL PROTECTED]> wrote: >> Is there another way of getting the number of overlapping features >> per cell? > > Hi, > > maybe this helps- you can try Radim's example from the vector screenshots > page. (see GRASS 6.0 "Overlapping polygons" section) > > http://grass.osgeo.org/screenshots/vector.php > > Yes, funny place for tutorial material, but it demos some functionality. Thanks Hamish - I found that one alredy, but it does not work: OK - her is what I did: > v.category input=fire_p output=fire_c type=centroid option=add --o <<-- > option field=2 does not exist any more? WARNING: Vector map already exists and will be overwritten Building topology ... 3901 primitives registered Building areas: 100% 1220 areas built 54 isles built Attaching islands: 100% Attaching centroids: 100% Topology was built. Number of nodes : 2735 Number of primitives: 3901 Number of points: 0 Number of lines : 0 Number of boundaries: 2746 Number of centroids : 1155 Number of areas : 1220 Number of isles : 54 Number of areas without centroid : 65 [Raster MASK present] > echo "create table fire_c_2 (id int, num int)" | db.execute > v.db.connect map=fire_c driver=dbf layer=2 table=fire_c_2 key=id -o The table is now part of vector map and may be deleted or overwritten by GRASS modules [Raster MASK present] > v.to.db map=fire_c layer=2 option=cat col=id <<-- option col1= changed to col= Updating database... 100% 7 categories read from map 0 records selected from table 0 categories read from map exist in selection from table 6 categories read from map don't exist in selection from table 6 records updated/inserted 0 update/insert errors [Raster MASK present] > v.to.db map=fire_c layer=2 qlayer=1 option=query column=num qcolumn="count(*)" type=centroid <<-- option col1= changed to column= qcol= to qcolumn= Reading data from the map... 100% Querying database... DBMI-DBF driver error: SQL parser error: in statement: SELECT count(*) FROM ... Error in db_open_select_cursor() I guess this is a problem with the dbf database? Is there any way of solving this in dbf? Rainer > > > Hamish > > > > > > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] problem with column label using r.cross
Dear GRASS user, I use r.cross for combining the raster data values of up to 9 layers/maps. The combinations are stored in column label of each new generated area. But column label seems to be limited to a specific number of characters, so that some information get lost in my case of 9 combining maps. My label column only shows a subpart like: category 2; category 3; category 2; category 0; category 0; category 9; category Something is missing in every row. How to solve it? Thanks a lot for any help! Regards, Christian. This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Vector dbf files + Spatial join
Hi All, Before I head into learning mySQL I would like to know if grass has a command that can merge / spatial join dbf attribute tables (similar to the spatial join used in ESRI). Reading the archives I see people have used anything from PostgreSQL to mySQL to combine the attributes of vectors. I have a 13 point data sets with 15625 points with attributes attached. I would like to combine all 13 into one dbase file and then import into a stats package. Do I need to use something like mySQL or does GRASS have a builtin function for this sort of application? If not could someone point me towards a GRASS orientated mySQL tutorial Many thanks, Wesley Wesley Roberts MSc. Researcher: Forest Assessment (Remote Sensing & GIS) Forestry and Forest Products Research Centre CSIR Tel: +27 (31) 242-2353 Fax: +27 (31) 261-1216 http://ffp.csir.co.za/ "To know the road ahead, ask those coming back." - Chinese proverb -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
On Tue, Jun 24, 2008 at 11:31 AM, Wesley Roberts <[EMAIL PROTECTED]> wrote: ... > Do I need to use something like mySQL or does GRASS have a builtin function > for > this sort of application? There is v.db.join. Using SQLite is sufficient for this task, then you can export db.out.ogr to some table file format. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
Hi, using e.g. postgres or mysql as storage backend for vector data you can use modules like v.db.join or db.execute for complex querying your vector data. Regards, Christian. Zitat von Wesley Roberts <[EMAIL PROTECTED]>: > Hi All, > > Before I head into learning mySQL I would like to know if grass has a command > that can merge / spatial join dbf attribute tables (similar to the spatial > join used in ESRI). > > Reading the archives I see people have used anything from PostgreSQL to mySQL > to combine the attributes of vectors. I have a 13 point data sets with 15625 > points with attributes attached. I would like to combine all 13 into one > dbase file and then import into a stats package. > > Do I need to use something like mySQL or does GRASS have a builtin function > for this sort of application? If not could someone point me towards a GRASS > orientated mySQL tutorial > > Many thanks, > Wesley > > Wesley Roberts MSc. > Researcher: Forest Assessment (Remote Sensing & GIS) > Forestry and Forest Products Research Centre > CSIR > Tel: +27 (31) 242-2353 > Fax: +27 (31) 261-1216 > http://ffp.csir.co.za/ > > "To know the road ahead, ask those coming back." > - Chinese proverb > > -- > This message is subject to the CSIR's copyright terms and conditions, e-mail > legal notice, and implemented Open Document Format (ODF) standard. > The full disclaimer details can be found at > http://www.csir.co.za/disclaimer.html. > > This message has been scanned for viruses and dangerous content by > MailScanner, > and is believed to be clean. MailScanner thanks Transtec Computers for their > support. > > ___ > grass-user mailing list > grass-user@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-user > This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
Christian Schwartze wrote: > I use r.cross for combining the raster data values of up to > 9 layers/maps. The combinations are stored in column label of each > new generated area. But column label seems to be limited to a specific > number of characters, so that some information get lost in my case of 9 > combining maps. My label column only shows a subpart like: > > category 2; category 3; category 2; category 0; category 0; category 9; > category (above ends at the 80th character) > Something is missing in every row. How to solve it? how are you viewing the cats? where does that cut-short line come from? I have just done a little test, and it seemed to write the cats file ok. Both raw if you look in the $MAPSET/cats/$MAPNAME file and printed with r.category. Only issue I found was that the cats file was huge and things like r.info took a long time. As I used fake data I won't worry about that. my test: g.region n=4925010 s=4913700 w=589980 e=603000 res=30 for i in `seq 10` ; do r.surf.gauss out=surf.gauss_tmp_$i r.mapcalc "surf.gauss_$i = int( surf.gauss_tmp_$i )" g.remove surf.gauss_tmp_$i --quiet done r.cross input=`g.mlist rast pat=surf.gauss_* sep=,` output=surf.gauss.x ? Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
Hi Markus, Thanks for the help but unfortunately I don't seem to have the v.db.join application. When I execute v.db.join within grass I get an error bash: v.db.join: command not found I am using Grass version 6.2.2 do I need to upgrade to 6.3 or is the v.db.join a sqlite command? Many thanks, Wesley Wesley Roberts MSc. Researcher: Forest Assessment (Remote Sensing & GIS) Forestry and Forest Products Research Centre CSIR Tel: +27 (31) 242-2353 Fax: +27 (31) 261-1216 http://ffp.csir.co.za/ "To know the road ahead, ask those coming back." - Chinese proverb -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
On Tue, Jun 24, 2008 at 12:19 PM, Wesley Roberts <[EMAIL PROTECTED]> wrote: > Hi Markus, > > Thanks for the help but unfortunately I don't seem to have the v.db.join > application. When I execute v.db.join within grass I get an error > bash: v.db.join: command not found > > I am using Grass version 6.2.2 do I need to upgrade to 6.3 or is the > v.db.join a sqlite command? Yes, it was introduced in 6.3.0: http://grass.osgeo.org/announces/announce_grass630.html You will like all the other improvements, too :) Best Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] SOLVED Determining number of overlapping features per location after import of shape file
Hi I managed to solve it: v.in.ogr dsn=./shp/ layer=fireHistory output=fireHistory v.category input=fireHistory output=tmpFire v.db.addtable map=tmpFire table=tmpFire_2 layer=2 columns='num,int' v.to.db map=tmpFire layer=2 qlayer=1 option=query col=num qcol='count(*)' type=centroid finally I can export it to a raster layer: v.to.rast input=tmpFire layer=2 output=mf use=attr column=num --overwrite Could the code on the website http://grass.osgeo.org/screenshots/vector.php please be updated, as it is not working under grass 6.3 and less commands are necessary? Is there a WIKI to which I could upload the code? Thanks for your help, Rainer On Tue, Jun 24, 2008 at 10:32 AM, Rainer M Krug <[EMAIL PROTECTED]> wrote: > On Tue, Jun 24, 2008 at 9:57 AM, Hamish <[EMAIL PROTECTED]> wrote: >>> Is there another way of getting the number of overlapping features >>> per cell? >> >> Hi, >> >> maybe this helps- you can try Radim's example from the vector screenshots >> page. (see GRASS 6.0 "Overlapping polygons" section) >> >> http://grass.osgeo.org/screenshots/vector.php >> >> Yes, funny place for tutorial material, but it demos some functionality. > > Thanks Hamish - I found that one alredy, but it does not work: > > > OK - her is what I did: > >> v.category input=fire_p output=fire_c type=centroid option=add --o <<-- >> option field=2 does not exist any more? > WARNING: Vector map already exists and will be overwritten > Building topology ... > 3901 primitives registered > Building areas: 100% > 1220 areas built > 54 isles built > Attaching islands: 100% > Attaching centroids: 100% > Topology was built. > Number of nodes : 2735 > Number of primitives: 3901 > Number of points: 0 > Number of lines : 0 > Number of boundaries: 2746 > Number of centroids : 1155 > Number of areas : 1220 > Number of isles : 54 > Number of areas without centroid : 65 > [Raster MASK present] > >> echo "create table fire_c_2 (id int, num int)" | db.execute > >> v.db.connect map=fire_c driver=dbf layer=2 table=fire_c_2 key=id -o > The table is now part of vector map and may be deleted > or overwritten by GRASS modules > [Raster MASK present] > > > v.to.db map=fire_c layer=2 option=cat col=id <<-- option col1= > changed to col= > Updating database... > 100% > 7 categories read from map > 0 records selected from table > 0 categories read from map exist in selection from table > 6 categories read from map don't exist in selection from table > 6 records updated/inserted > 0 update/insert errors > [Raster MASK present] > > > v.to.db map=fire_c layer=2 qlayer=1 option=query column=num > qcolumn="count(*)" type=centroid <<-- option col1= changed to column= > qcol= to qcolumn= > Reading data from the map... > 100% > Querying database... > DBMI-DBF driver error: > SQL parser error: > in statement: > SELECT count(*) FROM ... > Error in db_open_select_cursor() > > I guess this is a problem with the dbf database? Is there any way of > solving this in dbf? > > Rainer > >> >> >> Hamish >> >> >> >> >> >> > > > > -- > Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation > Biology, UCT), Dipl. Phys. (Germany) > > Plant Conservation Unit > Department of Botany > University of Cape Town > Rondebosch 7701 > South Africa > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.to.vect to selected locations only
> (r.what or v.what.rast) -> r.reclass -> MASK -> 'g.region zoom=' > (r.what or v.what.rast) -> r.reclass -> r.grow -> 'g.region rast=' r.reclass would reclass all the areas having the same value as the one from r.what, so it's not guaranteed that just the area around the specified point is considered. Am I wrong? Are you sure r.grow is useful? As far as I've unserstood it makes a sort of r.buffer+r.patch, based on a buffer radii, not inspecting the pixel values... Yes r.mapcalc can do the work, but I was tinking to something like r.lake... Maybe it's more performant. Ok, proabibly it should be written with a C routine not bash. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
Ok and thanks, better to look at first within GRASS if eveything is working fine ;) (in cats/ full category values) Because the reduced line comes from QGIS (selection tool). I forgot to say that following r.cross I do a conversion with r.to.vect and export the result to a shapefile. So the original label vals were mapped to dbf-column type "C". But why exporting only 80 chars? Regards, Christian. Zitat von Hamish <[EMAIL PROTECTED]>: > Christian Schwartze wrote: > > I use r.cross for combining the raster data values of up to > > 9 layers/maps. The combinations are stored in column label of each > > new generated area. But column label seems to be limited to a specific > > number of characters, so that some information get lost in my case of 9 > > combining maps. My label column only shows a subpart like: > > > > category 2; category 3; category 2; category 0; category 0; category 9; > category > > (above ends at the 80th character) > > > Something is missing in every row. How to solve it? > > how are you viewing the cats? where does that cut-short line come from? > > > > I have just done a little test, and it seemed to write the cats file ok. > Both raw if you look in the $MAPSET/cats/$MAPNAME file and printed with > r.category. Only issue I found was that the cats file was huge and things > like r.info took a long time. As I used fake data I won't worry about that. > > my test: > > g.region n=4925010 s=4913700 w=589980 e=603000 res=30 > > for i in `seq 10` ; do >r.surf.gauss out=surf.gauss_tmp_$i >r.mapcalc "surf.gauss_$i = int( surf.gauss_tmp_$i )" >g.remove surf.gauss_tmp_$i --quiet > done > > r.cross input=`g.mlist rast pat=surf.gauss_* sep=,` output=surf.gauss.x > > > ? > Hamish > > > > > > This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
Hi Markus, I tried to upgrade using the links from the announcement. I added the respective repositories to my sources.list file and upgraded no problem. I now have 6.2.3, unfortunately this does not include the v.db.join. I am now downloading the 6.3 source and am going to compile using that. Do I need to uninstall 6.2.3 before I compile? Also I found the v.db.join script at http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/scripts Can I use this script in 6.2.3? If so how do I go about compiling and using? Many thanks, Wesley Wesley Roberts MSc. Researcher: Forest Assessment (Remote Sensing & GIS) Forestry and Forest Products Research Centre CSIR Tel: +27 (31) 242-2353 Fax: +27 (31) 261-1216 http://ffp.csir.co.za/ "To know the road ahead, ask those coming back." - Chinese proverb >>> "Markus Neteler" <[EMAIL PROTECTED]> 06/24/08 12:26 PM >>> On Tue, Jun 24, 2008 at 12:19 PM, Wesley Roberts <[EMAIL PROTECTED]> wrote: > Hi Markus, > > Thanks for the help but unfortunately I don't seem to have the v.db.join > application. When I execute v.db.join within grass I get an error > bash: v.db.join: command not found > > I am using Grass version 6.2.2 do I need to upgrade to 6.3 or is the > v.db.join a sqlite command? Yes, it was introduced in 6.3.0: http://grass.osgeo.org/announces/announce_grass630.html You will like all the other improvements, too :) Best Markus -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
Just now I read in the gdal description for shapefile driver: "String fields without an assigned width are treated as 80 characters." How can I modify that? Christian. Zitat von Hamish <[EMAIL PROTECTED]>: > Christian Schwartze wrote: > > I use r.cross for combining the raster data values of up to > > 9 layers/maps. The combinations are stored in column label of each > > new generated area. But column label seems to be limited to a specific > > number of characters, so that some information get lost in my case of 9 > > combining maps. My label column only shows a subpart like: > > > > category 2; category 3; category 2; category 0; category 0; category 9; > category > > (above ends at the 80th character) > > > Something is missing in every row. How to solve it? > > how are you viewing the cats? where does that cut-short line come from? > > > > I have just done a little test, and it seemed to write the cats file ok. > Both raw if you look in the $MAPSET/cats/$MAPNAME file and printed with > r.category. Only issue I found was that the cats file was huge and things > like r.info took a long time. As I used fake data I won't worry about that. > > my test: > > g.region n=4925010 s=4913700 w=589980 e=603000 res=30 > > for i in `seq 10` ; do >r.surf.gauss out=surf.gauss_tmp_$i >r.mapcalc "surf.gauss_$i = int( surf.gauss_tmp_$i )" >g.remove surf.gauss_tmp_$i --quiet > done > > r.cross input=`g.mlist rast pat=surf.gauss_* sep=,` output=surf.gauss.x > > > ? > Hamish > > > > > > This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Vector dbf files + Spatial join
Hi Wesley, On Tue, Jun 24, 2008 at 1:50 PM, Wesley Roberts <[EMAIL PROTECTED]> wrote: > Hi Markus, > > I tried to upgrade using the links from the announcement. I added the > respective repositories to my sources.list file and upgraded no problem. I > now have 6.2.3, unfortunately this does not include the v.db.join. As mentioned, we introduced it in 6.3.0. > I am now downloading the 6.3 source and am going to compile using that. Do I > need to uninstall 6.2.3 before I compile? No, you can keep both in parallel. > Also I found the v.db.join script at > http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/scripts > Can I use this script in 6.2.3? If so how do I go about compiling and using? I am not sure of v.db.join makes use of 6.3.0 functionality. It's just a script (so copying is enough in theory). Say, it's rather unlikely that it works with 6.2.x. You can try of course. Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Problem with wingrass
I´ve tried to install many times and from different mirrors wingrass 6.3 native and also the qgis 0.10 package with grass but the computer answers me that the integrity check failed. Anyone could help me? Thank you. Simone ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] SOLVED Determining number of overlapping features per location after import of shape file
On Tue, Jun 24, 2008 at 12:28 PM, Rainer M Krug <[EMAIL PROTECTED]> wrote: > Hi > > I managed to solve it: great! >v.in.ogr dsn=./shp/ layer=fireHistory output=fireHistory >v.category input=fireHistory output=tmpFire >v.db.addtable map=tmpFire table=tmpFire_2 layer=2 columns='num,int' >v.to.db map=tmpFire layer=2 qlayer=1 option=query col=num > qcol='count(*)' type=centroid > > finally I can export it to a raster layer: > v.to.rast input=tmpFire layer=2 output=mf use=attr column=num --overwrite > > Could the code on the website > http://grass.osgeo.org/screenshots/vector.php please be updated, as it > is not working under grass 6.3 and less commands are necessary? I have indicated the GRASS verison there. > Is there a WIKI to which I could upload the code? I have created a new FAQ: http://grass.osgeo.org/wiki/Vector_Overlapping_Areas List of FAQs: http://grass.osgeo.org/wiki/Category:FAQ Feel free to modify, rewrite, ... :) Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] SOLVED Determining number of overlapping features per location after import of shape file
I forgot to mention: I did NOT get it to work with dbf and switched to sqlite where it worked. On Tue, Jun 24, 2008 at 2:21 PM, Markus Neteler <[EMAIL PROTECTED]> wrote: > On Tue, Jun 24, 2008 at 12:28 PM, Rainer M Krug <[EMAIL PROTECTED]> wrote: >> Hi >> >> I managed to solve it: > > great! > >>v.in.ogr dsn=./shp/ layer=fireHistory output=fireHistory >>v.category input=fireHistory output=tmpFire >>v.db.addtable map=tmpFire table=tmpFire_2 layer=2 columns='num,int' >>v.to.db map=tmpFire layer=2 qlayer=1 option=query col=num >> qcol='count(*)' type=centroid >> >> finally I can export it to a raster layer: >> v.to.rast input=tmpFire layer=2 output=mf use=attr column=num --overwrite >> >> Could the code on the website >> http://grass.osgeo.org/screenshots/vector.php please be updated, as it >> is not working under grass 6.3 and less commands are necessary? > > I have indicated the GRASS verison there. > >> Is there a WIKI to which I could upload the code? > > I have created a new FAQ: > http://grass.osgeo.org/wiki/Vector_Overlapping_Areas > > List of FAQs: > http://grass.osgeo.org/wiki/Category:FAQ > > Feel free to modify, rewrite, ... :) > > Markus > -- Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany) Plant Conservation Unit Department of Botany University of Cape Town Rondebosch 7701 South Africa ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] r.to.vect to selected locations only
Hamish: > > (r.what or v.what.rast) -> r.reclass -> MASK -> 'g.region zoom=' > > (r.what or v.what.rast) -> r.reclass -> r.grow -> 'g.region rast=' G. Allegri wrote: > r.reclass would reclass all the areas having the same value > as the one from r.what, so it's not guaranteed that just the area > around the specified point is considered. Am I wrong? that is correct; all of that value in the map. > Are you sure r.grow is useful? As far as I've unserstood it makes > a sort of r.buffer+r.patch, based on a buffer radii, not > inspecting the pixel values... oops, I meant r.cost. > Yes r.mapcalc can do the work, but I was tinking to something like > r.lake... Maybe it's more performant. Ok, proabibly it should be > written with a C routine not bash. well bash is nice for prototypes and proof of concept. You can worry about C later if you can't stand the slowness. Usually you can stand it. I've never used r.lake much, so can't comment on if it could offer a solution. random idea: Maybe we could add a "module of the day" feed on the grass webpage with module name and label/description one-liner. I continue to find new modules many years after first using grass. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
RE: [GRASS-user] r.to.vect to selected locations only
Hamish: >random idea: >Maybe we could add a "module of the day" feed on the grass webpage with module >name and label/description one-liner. I continue to find new modules many >years after first using grass. The same with me; not only am I discovering new modules, but also discovering flags present in old modules I've used for years that I wish I had known about years ago! ~ Eric. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
> Christian Schwartze > Ok and thanks, better to look at first within GRASS if > eveything is working fine > ;) (in cats/ full category values) Because the reduced line > comes from QGIS > (selection tool). I forgot to say that following r.cross I > do a conversion with > r.to.vect and export the result to a shapefile. So the > original label vals were > mapped to dbf-column type "C". But why exporting only 80 chars? Does v.db.select show the cut string? which DB backend? (dbf?) "db.describe -c vect_map" ? Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] problem with column label using r.cross
Zitat von Hamish <[EMAIL PROTECTED]>: > > Christian Schwartze > > Ok and thanks, better to look at first within GRASS if > > eveything is working fine > > ;) (in cats/ full category values) Because the reduced line > > comes from QGIS > > (selection tool). I forgot to say that following r.cross I > > do a conversion with > > r.to.vect and export the result to a shapefile. So the > > original label vals were > > mapped to dbf-column type "C". But why exporting only 80 chars? > > > Does v.db.select show the cut string? > which DB backend? (dbf?) v.db.select shows the full length of column label for all data rows - nothing is missing. I use dbf backend. > > "db.describe -c vect_map" ? ncols:3 Column 1:cat:INTEGER Column 2:value:INTEGER Column 3:label:CHARACTER Christian. > > > Hamish > > > > > > This mail was sent through http://webmail.uni-jena.de ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] SOLVED Determining number of overlapping features per location after import of shape file
Rainer: > Is there a WIKI to which I could upload the code? Yes. http://grass.osgeo.org/wiki/GRASS_6_Tutorial (slow merge from http://grass.itc.it/grass57/tutorial/) what Markus just created: http://grass.osgeo.org/wiki/Vector_Overlapping_Areas main wiki site: http://grass.osgeo.org/wiki/Main_Page just create yourself an account & go for it. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
On Mon, 23 Jun 2008, Martina Schaefer wrote: Hi, thanks first for all your fast answers, I'm still a bit lost in GRASS. I'll come back to your answers to my other questions later, I have first to work a bit more on your suggestions. For nearly all data that I try to import with r.in.gdal, I get warnings/error messages like this: "A datum name wgs84 (WGS_1984) was specified without transformation parameters. Note that the GRASS default for wgs84 is towgs84=0.000,0.000,0.000." That is normal and harmless. Datum transformation parametes are normally defined in terms of their relationship wih WGS84, so if your datum is WGS84 itself then it doesn't matter if the parameters are specified or not: towgs84=0,0,0 is the only possible parameter set. or "WARNING: No projection name! Projection parameters likely to be meaningless. That is of much more concern. Can you try running gdalinfo filename.tif on the file that has the problem, and posting the results to the list here in the hope that someone can see what is wrong? Paul ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] r.sim.water for flood hazard assessment?
I have to assess flood hazard map for a big area, so I wish to do it in a parsimonius way... can r.sim.water be used to assess flood hazards? or Do you have to suggest other Open Source approaches? Thanks, Maxi -- - Dr. Massimiliano Cannata Environmental & Geomatic Engineer Institute of Earth Scences - SUPSI Trevano, C.P. 72, CH-6952 Canobbio, SWITZERLAND Tel:+41 (0)58 / 666 62 14 Fax:+41 (0)58 / 666 62 09 E-mail: [EMAIL PROTECTED] Web: http://www.ist.supsi.ch http://istgis.ist.supsi.ch:8001/geomatica/ --- ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
Hi Paul, here the infos that you asked me for: "WARNING: No projection name! Projection parameters likely to be meaningless. That is of much more concern. Can you try running gdalinfo filename.tif on the file that has the problem, and posting the results to the list here in the hope that someone can see what is wrong? here the output GRASS 6.2.2 (BelcherBathy):~/Work/Devon-Data/bthy > gdalinfo 5latlong.tif Driver: GTiff/GeoTIFF Size is 15134, 2496 Coordinate System is: PROJCS["unnamed", GEOGCS["unnamed", DATUM["unknown", SPHEROID["unretrievable - using WGS84",6378137,298.257223563]], PRIMEM["Greenwich",0], UNIT[,0.0174532925199433]], UNIT["unknown",1]] Origin = (-81.3271577,75.7672084) Pixel Size = (0.49996696181,-0.49979967949) Image Structure Metadata: COMPRESSION=LZW Corner Coordinates: Upper Left ( -81.3271580, 75.7672090) Lower Left ( -81.3271580, 75.6424590) Upper Right ( -80.5705080, 75.7672090) Lower Right ( -80.5705080, 75.6424590) Center ( -80.9488330, 75.7048340) Band 1 Block=15134x1 Type=Byte, ColorInterp=Red Band 2 Block=15134x1 Type=Byte, ColorInterp=Green Band 3 Block=15134x1 Type=Byte, ColorInterp=Blue Band 4 Block=15134x1 Type=Byte, ColorInterp=Alpha in fact, this is the same data as the following one, only transformed to LatLong by ArcGIS GRASS 6.2.2 (BelcherBathy):~/Work/Devon-Data/bthy > gdalinfo 5_utm.tif Driver: GTiff/GeoTIFF Size is 14805, 2508 Coordinate System is: PROJCS["WGS 84 / UTM zone 17N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-81], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",50], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","32617"]] Origin = (490944.258245616627391,8409263.051821239292622) Pixel Size = (1.414845022256486,-5.571261774748564) Metadata: AREA_OR_POINT=Area TIFFTAG_SOFTWARE=IMAGINE TIFF Support Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.9.1.3 $ $Date: 2002/07/29 15:39:06EDT $ TIFFTAG_XRESOLUTION=1 TIFFTAG_YRESOLUTION=1 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: COMPRESSION=LZW Corner Coordinates: Upper Left ( 490944.258, 8409263.052) Lower Left ( 490944.258, 8395290.327) Upper Right ( 511891.039, 8409263.052) Lower Right ( 511891.039, 8395290.327) Center ( 501417.649, 8402276.690) Band 1 Block=14805x1 Type=Byte, ColorInterp=Red Band 2 Block=14805x1 Type=Byte, ColorInterp=Green Band 3 Block=14805x1 Type=Byte, ColorInterp=Blue Band 4 Block=14805x1 Type=Byte, ColorInterp=Undefined and from the following file I got this error message "WARNING: No projection name! Projection parameters likely to be meaningless. A datum name nad83 (North_American_Datum_1983) was specified without transformation parameters. " And even if I can open the file, I can't for example project it to LongLat, everytime I get error messages about this transformation parameter. I suppose the problem is the "unnamed" in the PROJCS, but how could I fill it and with what? This file is orignially a img file that I can open without problems with ArcGIS, but grass says "GDALOpen failed - 4 `oa16787_058.img' not recognised as a supported file format." so I converted it to tif by img2tif GRASS 6.2.2 (BelcherBathy):~/Work/Devon-Data/new > gdalinfo oa16787_058.tif Driver: GTiff/GeoTIFF Size is 2357, 2264 Coordinate System is: PROJCS["unnamed", GEOGCS["NAD83", DATUM["North_American_Datum_1983", SPHEROID["unnamed",6378137,298.2572220960423], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4269"]], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","26817"]] Origin = (489494.41180001676,8397247.05880697374) Pixel Size = (5.000,-5.000) Metadata: AREA_OR_POINT=Area Corner Coordinates: Upper Left ( 489494.412, 8397247.059) Lower Left ( 489494.412, 8385927.059) Upper Right ( 501279.412, 8397247.059) Lower Right ( 501279.412, 8385927.059) Center ( 495386.912, 8391587.059) Band 1 Block=64x64 Type=Byte, ColorInterp=Gray Thanks for all good ideas! Martina ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] New User Getting Started
Hi Folks, I'm new to GRASS, and I'm hoping somebody can give me some advice to get me started... I have two netcdf raster grids. One is seafloor age, the other is seafloor depth. The files both cover the same geographic area, although the grids are different resolutions. What I want to do is plot a simple x-y graph of seafloor age vs. depth, where each point in my graph represents the a seafloor age grid cell and the intersecting seafloor depth cell. Can this be done? Can anyone suggest some basic steps to get me started? No instruction is too basic for me -- this is my first day with GRASS. I have just installed GRASS (and R, just in case it's necessary), but otherwise I have no idea how to proceed. Thanks, Brock ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] importing geotif in grass, transformation parameters
On Tue, 24 Jun 2008, Martina Schaefer wrote: Hi Paul, here the infos that you asked me for: [...] in fact, this is the same data as the following one, only transformed to LatLong by ArcGIS GRASS 6.2.2 (BelcherBathy):~/Work/Devon-Data/bthy > gdalinfo 5_utm.tif Driver: GTiff/GeoTIFF Size is 14805, 2508 Coordinate System is: PROJCS["WGS 84 / UTM zone 17N", GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.2572235630016, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich",0], UNIT["degree",0.0174532925199433], AUTHORITY["EPSG","4326"]], PROJECTION["Transverse_Mercator"], PARAMETER["latitude_of_origin",0], PARAMETER["central_meridian",-81], PARAMETER["scale_factor",0.9996], PARAMETER["false_easting",50], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AUTHORITY["EPSG","32617"]] Origin = (490944.258245616627391,8409263.051821239292622) Pixel Size = (1.414845022256486,-5.571261774748564) Metadata: AREA_OR_POINT=Area TIFFTAG_SOFTWARE=IMAGINE TIFF Support Copyright 1991 - 1999 by ERDAS, Inc. All Rights Reserved @(#)$RCSfile: etif.c $ $Revision: 1.9.1.3 $ $Date: 2002/07/29 15:39:06EDT $ TIFFTAG_XRESOLUTION=1 TIFFTAG_YRESOLUTION=1 TIFFTAG_RESOLUTIONUNIT=2 (pixels/inch) Image Structure Metadata: COMPRESSION=LZW Corner Coordinates: Upper Left ( 490944.258, 8409263.052) Lower Left ( 490944.258, 8395290.327) Upper Right ( 511891.039, 8409263.052) Lower Right ( 511891.039, 8395290.327) Center ( 501417.649, 8402276.690) Band 1 Block=14805x1 Type=Byte, ColorInterp=Red Band 2 Block=14805x1 Type=Byte, ColorInterp=Green Band 3 Block=14805x1 Type=Byte, ColorInterp=Blue Band 4 Block=14805x1 Type=Byte, ColorInterp=Undefined If you run g.proj -c georef=filename where filename is the name of the file that contains the correct co-ordinate system info, it will overwrite the current location's projection with the correct values. Although only do this if you are sure the projection is definitely correct, and not just a default value that the other software added into the file. Add the -i flag as well as -c if you want to be interactively prompted for datum parameters (with some hints on which ones to pick). Hope this helps a bit Paul ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
"module of the day" feed idea - was Re: [GRASS-user] r.to.vect to selected locations only
On Tue, Jun 24, 2008 at 2:54 PM, Hamish <[EMAIL PROTECTED]> wrote: > random idea: > Maybe we could add a "module of the day" feed on the grass webpage with > module name > and label/description one-liner. I continue to find new modules many years > after first using grass. Nice idea indeed. I guess a bit of PHP/XML hacking is sufficient ... volunteers? Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Techniques using v.digit.
Good day all, I have used v.digit experimentally when digitizing contour lines from a topo map but have a questions about digitizing contour lines, building footprints, and other. The module v.digit has tools for digitizing lines, boundaries and centroids. Contour lines can be open or closed, forming a crude circle, square, etc. When digitizing contour lines that are closed, would you use the line tool and close the contour lines using the snapping tool or would you digitize contour lines similar to this by using the boundary tool? In general, is the boundary tool only used for polygons? What about roads, and buildings? Would you use the line tool, and after apply the snapping tool or would you digitize buildings and roads using the boundary tool? Or does it matter? Does the techniques matter when developing digital elevation models from topo maps? I also have questions about edge matching using GRASS. I am attempting to digitize and combine two adjacent maps but have not been successful. One way I thought about doing this align the two adjacent maps and tape the two maps together, scan the taped sections, after georeference this portion, cut and possibly use v.patch to combine different map sections. Is there an easier way this could be carried out? Thanks for any techniques you have to offer. Charles ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Two questions - vector data and Mac install
Hi all, 1) v.overlay question I have three maps: two area vectors (A and B), and a v.overlay result (C). Is there a simple way to assign the percentage of areas in (A) covered by the overlay (C)? 2) Mac install Wish 8.4 is breaking on a friends new installation, with the reason as "image not found". Do we need to reinstall X or is it something else? Richard Chirgwin ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user