Re: [GRASS-user] count vector points (quadrat count)
Hi, You could try r.in.xyz using 'method=n' which will count points per cell (resolution chosen in g.region) and write a raster map allocating the number count to the cell. John On Thursday 08 April 2010 07:39:12 Robbie Heremans wrote: > Dear, > > How can I count vector points by region resolution (quadrat count) and > write the results in a raster map (in order to perform r.mapcalc on these > observed frequencies). > > Is v.to.rast the command I should use (v.to.rast input=myvec output=myras > use=??? value=???) > > Robbie > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] count vector points (quadrat count)
Dear, How can I count vector points by region resolution (quadrat count) and write the results in a raster map (in order to perform r.mapcalc on these observed frequencies). Is v.to.rast the command I should use (v.to.rast input=myvec output=myras use=??? value=???) Robbie ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] can I access mapset outside of grass, by using python?
On Mon, 2010-03-08 at 01:20 +0100, Nikos Alexandris wrote: > I understand that this "way" of using grass isn't recommended for (let > us say) beginners. Nevertheless, my aim was/is to put most of this > thread in a wiki-page because I consider it as very practical. --%<--- http://grass.osgeo.org/wiki/Working_with_GRASS_without_starting_it_explicitly More details and issues to be added... Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Parsing output with python
thedok78 wrote: > I am porting a bash script to python and for it I need to know the number of > cells of a certain category. Right now I use this syntax: > grass.parse_command('r.stats',flags='c',input='map'), but the output is > something like this: {'112 525': None.. }. > Is there a way to have {'112':525..} so that I can easy get the number of > cells ? You need to use sep=' ' (the default separator is a colon). But ideally you shouldn't use parse_command for programs which can return a lot of output; use pipe_command() and parse the output yourself, e.g.: p = grass.pipe_command('r.stats',flags='c',input='map') result = {} for line in p.stdout: [val,count] = line.strip().split() result[int(val)] = int(count) p.wait() Also, parse_command() will use strings as keys and values, when integers would probably be more useful. -- Glynn Clements ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Polish datum problem
Hi This is rather question for Polish GRASS users Did anyone notice what had happed with "PUWG 1965" within Proj4 EPSG database? Since PROJ version 4.6 is : <2173> +proj=sterea +lat_0=53.583334 +lon_0=17.008333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +units=m +no_defs <> but shoud be: "+proj=sterea +lat_0=53.583334 +lon_0=17.008333 +k=0.9998 +x_0=3501000 +y_0=5999000 +ellps=krass +towgs84=33.4,-146.6,-76.3,-0.359,-0.053,0.844,-0.84 +units=m +no_defs"; and it causes error when zone 1-4 is choosed: WARNING: Datum not recognised by GRASS and no parametrs found And what had happend with "PUWG1942"? Dissapeared??? Both 1965 and 1942 still exist in original EPSG and POSTGIS so I'm confused... any suggestions? J. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: claslite modules in GRASS?
I just had a look at claslite, with hopes it might be able to help with a tropical forest assessment project I am helping out with in a small way. But the software is tailored and licensed to the wrong geographic region for me. More to the point, reading the user agreement I get the sense that the Carnegie Institute of Washington wants to maintain tight control of the spectral libraries and would not allow adapting them for use in other software. That's a pity -- maybe spectral libraries make up another category of data we in the open data movement need to be concerned with. -- Allan Hollander ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Using r.mapcalc to extract road network from satellite imagery
Hi all, i have been using V.clean to get a straight line of road network from my satellite imagery which i have successfully classified and converted to vector from raster. I read some articles on r.mapcalc as a possiblility for extracting a clean road network but i tried using it but did not notice any visible change on the map. though am not good with using all the variable available for it. have anyone used this command or is there a better command i could use? Thanks. Nath ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] v.lidar.edgedetection -e option
Just installed updated 6.5svn, and the -e option is indeed present. Thanks for the help. Mark On Tue, Apr 6, 2010 at 10:36 AM, Markus Neteler wrote: > On Tue, Apr 6, 2010 at 4:26 PM, M S wrote: > > I'll try updating. It looks like it was installed around February 11. > > Markus Metz fixed them on Feb 17 :) > > http://trac.osgeo.org/grass/browser/grass/branches/develbranch_6/vector/lidar > > Cheers > Markus > ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Parsing output with python
Hello everybody, I am porting a bash script to python and for it I need to know the number of cells of a certain category. Right now I use this syntax: grass.parse_command('r.stats',flags='c',input='map'), but the output is something like this: {'112 525': None.. }. Is there a way to have {'112':525..} so that I can easy get the number of cells ? Thank you very much Luca -- View this message in context: http://n2.nabble.com/Parsing-output-with-python-tp4864105p4864105.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Output parsing in python
Hello everybody, I am porting a bash script to python and for it I need to know the number of cells of a certain category. Right now I use this syntax: grass.parse_command('r.stats',flags='c',input='map'), but the output is something like this: {'112 525': None.. }. Is there a way to have {'112':525..} so that I can easy get the number of cells ? Thank you very much Luca -- View this message in context: http://n2.nabble.com/Output-parsing-in-python-tp4864508p4864508.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Histogram Matching
On Wed, Apr 7, 2010 at 3:24 AM, Nikos Alexandris wrote: > On Thu, Dec 17, 2009 at 11:52 AM, andry rustanto wrote: >> > Dear All, >> > >> > Please inform me how to do histogram matching in grass gis, thank you >> > indeed.. > > On Tue, 2010-01-12 at 07:21 +0100, Markus Neteler wrote: >> In 2004, we had a master student implementing this. I could send you >> the scripts if you are interested. Ideally they would be updated/rewritten >> to Python to match the new GRASS scripting standard. > > Hi Markus! > > Are the above-mentioned scripts publicly accessible somewhere? I have sent it offlist to you - since it needs (severe?) updates, I'd suggest to later publich a working version... Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user