Re: [GRASS-user] importing an e00 file grass6.2
Janet Choate wrote: Hello grass user community, I am trying to import an e00 file into grass6.2.2. In older versions of grass, I was able to use m.in.e00, which is no longer available with grass6 versions. I see that I should be able to use v.in.e00 with grass6.2.2. However, I get the following error: command used: v.in.e00 file=ms02714.e00 type=area AFAIK, e00 files can also contain raster grids. If there is really a raster in there, there is a tool called import71 running on Windows only which can get both coverages and grids out of an e00 file. After that r.in.gdal should work. Just an idea. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Central tendency with Grass
On Wed, 2009-03-04 at 13:23 -0800, leonidas wrote: Niko, I need a tool to find spatial mean (mean center), weighted mean center, and standard distance. You can take a look in this article to understand what I mean (in greek): http://www.demography-lab.prd.uth.gr/DDAoG/edu/case/2/kentro-v.htm So, I'm looking for a tool that I'll define as input a point shapefile (or vector map in grass) with a field for weight values(for weighted mean center) and then, as an output, I'll get a shapefile with one point for spatial mean, another shapefile with a point as the weighted mean center and finally a shapefile with a polygon representing the standard distance as circle.Thank you for the interest, Leonidas If you happened to have a Windows machine (I don't think it runs on Linux)I would try this one http://www.icpsr.umich.edu/CRIMESTAT/ Cheers Nikos Alexandris wrote: On Mon, 2009-03-02 at 01:02 -0800, leonidas wrote: I need to calculate some Central tendency quotients like Mean Center, Weighted Mean Center and Standard Distance. Are there any tools to implement it with Grass Gis (or other OS software)? It may be easy to extract the point coordinates of a shp and make the calculations but I'd like to know if there is any build in tool in Grass GIS or other OS soft.Thanks, Leonidas Leonida, could you be a bit more specific? You need to upload in specific points values like mean, weighted mean, standard distance, etc? If yes, how big should be your radius for each point, i.e. how big will be your circle from which the numbers will come? There are lot's of tools in GRASS and you just need to synthesise them to find the solution you need. Cheers, 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
[GRASS-user] scripting mapcalc
Hi, did someone tried -like me- to use r.mapcalc in a script inside an do-while-clause? I cannot pass changing variables $old, $new like: r.mapcalc 'river=if(river=$old,$new,null())' its because of the '', which are needed because if the if-statement. I failed passing the hole statement eg. 'river=if(river=5,4,null())' as a variable like: r.mapcac $statement ... I tried many things and some shells (bash,csh,tcsh)... I think its because the ''. Besides when it seemed do be expressed the right way I got this answer: r.mapcalc 'river=if(river=4032076,4032075,null())' -debugging output syntax error, unexpected $end, expecting '=' Parse error or syntax error, unexpected '=', expecting ')' Parse error or Ungültiger Dateiname. Das Zeichen = ist nicht erlaubt. Ungültige Karte if(river=4032076,4032075,null()) Parse error depending on what I tried. Can someone help? Or is there another (and faster) way to query raster-data without writing a C-Program? I'd like to do it inside grass. Otherwise I would export the map to octave to calculate there, but its not the gentle way I think. Thanks, achim ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
Try this: r.mapcalc river=if(river==$old, $new, null()) Cheers, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
Its awful! That does work (in tsch so far! I tried -not alone- for hours... Thank you very much, Nikos! Maybe you know a way to make r.mapcalc quiet? Or maybe to query a rastermap col-row wise? Greetings from Potsdam at the moment. achim Nikos Alexandris schrieb: Try this: r.mapcalc river=if(river==$old, $new, null()) Cheers, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
Hallo Achim! On Thu, 2009-03-05 at 15:55 +0100, achim wrote: Its awful! That does work (in tsch so far! What is _tsch_? Do you mean _tcsh_? Sorry for my ignorance if it's something I _should_ know :-) Maybe you know a way to make r.mapcalc quiet? Not really. The Experts should know that :-) Or maybe to query a rastermap col-row wise? Sure it's possible. I don't have beforehand an example or can't produce from memory anything right now (small experience on this). Best check the r.mapcalc manual for its internal variables row() and col(). Greetings from Potsdam at the moment. achim Greetings from Freiburg, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Central tendency with Grass
Well, CRIMESTAT seems to work with WINE on Ubuntu 8.10. I start it without any errors (but only started, didn' try to load data and perform analysis!). leonidas wrote: If you happened to have a Windows machine (I don't think it runs on Linux)I would try this one http://www.icpsr.umich.edu/CRIMESTAT/ Cheers Thank you, I'll try it. I also found that for R: http://cran.r-project.org/web/packages/aspace/index.html -- View this message in context: http://n2.nabble.com/Central-tendency-with-Grass-tp2408175p2430128.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] scripting mapcalc
The Problem isn't solved yet!! I posted an easy example, but calculating with more complicated scenarios I got these: r.mapcalc river=if(river[0,1]=4032076 ,4032075,river) syntax error, unexpected '=', expecting ')' Parse error or r.mapcalc river=if( river=4032076 ||| river=4032076 ,4032075,river) syntax error, unexpected '=', expecting '@' or '(' Parse error Any ideas? Thanks (anyway), achim Nikos Alexandris schrieb: Hallo Achim! On Thu, 2009-03-05 at 15:55 +0100, achim wrote: Its awful! That does work (in tsch so far! What is _tsch_? Do you mean _tcsh_? Sorry for my ignorance if it's something I _should_ know :-) Maybe you know a way to make r.mapcalc quiet? Not really. The Experts should know that :-) Or maybe to query a rastermap col-row wise? Sure it's possible. I don't have beforehand an example or can't produce from memory anything right now (small experience on this). Best check the r.mapcalc manual for its internal variables row() and col(). Greetings from Potsdam at the moment. achim Greetings from Freiburg, Nikos ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
On Thu, Mar 5, 2009 at 3:42 PM, achim a...@jupiter.uni-freiburg.de wrote: Hi, did someone tried -like me- to use r.mapcalc in a script inside an do-while-clause? I cannot pass changing variables $old, $new like: r.mapcalc 'river=if(river=$old,$new,null())' its because of the '', which are needed because if the if-statement. If you use single quotes '$foo', then the variables are protected. You need to use double quotes: $foo: r.mapcalc river=if(river=$old,$new,null()) Markus PS: In GRASS 7, you need white space (at least) before the equal sign: r.mapcalc river = if(river=$old,$new,null()) (see its manual) ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Determine surface areas
Hi! I am still working on the extended problem and so far i have done the following. I created circles and sectors in autocad and imported the dxf file (first one sector at a time). The import didn't seem to work that well, so i converted lines to boundaries and used v.clean to get areas, and inserted a centroid with v.digit and created a rastermap with v.to.rast (source: val, and featuretype area). using the rastermap as mask I can use r.report or r.stats to get the waterarea/watercells. Because there are 160 of these areas i was wondering if there is a possibility to use all of the areas at once (or at least more than one at a time) assign some kind of an ID to every area and get the results separately for every area. trying to use more than one area at a time always got me the total stats for all areas. kindest regards Nikolaus On 27/02/09 09:53, Nikolaus Arnold wrote: Hi! I am new to using GIS and GRASS. I am currently working on a task where I have to determine the type of surface around a specific coordinate. For example what is the total water surface area in a 100km radius around the Eiffeltower. I have found a landcover map ( http://glcf.umiacs.umd.edu/data/landcover/ ) with a 1km raster that isn't perfect but should do the job. If it is for Europe, you might want to check out Corine Landcover [1] which has a resolution of 1 ha. After some time I managed displaying the map and showing only specific values in GRASS. My next step would have been exporting the map to an image, draw the desired circles with a image editing tool and count the contained fields manually. But taking a closer look at GRASS and the vectormap function, I wondered if it would be possible to create vector circles, merge them with the existing map and let GRASS do the work of counting the Areas. Does this seem possible? If yes, what would be the first steps? 1) Use buffering to create desired buffers: r.buffer or v.buffer (possibly + v.to.rast) 2) Calculate statistics of land use per buffer: r.stats, r.report if you use raster buffers, v.rast.stats if you use vector buffers Moritz [1]http://dataservice.eea.europa.eu/dataservice/metadetails.asp?id=1007 and http://www.eea.europa.eu/themes/landuse/clc-download ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] How update vector layers?
I have a location with sugarcane areas. They are in a vector layer and each area have a line in a table in a pg database. There are new areas being planted in the farm and i have them in a shape file. I imported the new vectors and i want put them into the layer sugarcane to update it. My question is: how can i do it without interfering in the table structure and without to need create a new table? I tried v.overlay, but it adds new columns to the new table and a don't want i new table. Then, i tried v.patch, but this module is not apropriated to do this. It looks like very simple to do, but simply don't know how. Help me!! Thybério Luna - Brazil ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
Nikos Alexandris wrote: Try this: r.mapcalc river=if(river==$old, $new, null()) Note that this won't work in 7.0, where r.mapcalc uses the parser. It will complain that r.mapcalc doesn't have a river=... option. For portability, always: 1. quote the entire expression, and 2. insert a space before the first = sign, e.g.: r.mapcalc river = if(river==$old, $new, null()) This will work with all versions of r.mapcalc. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] scripting mapcalc
Daniel Victoria wrote: To get around the ' or problems when scripting for r.mapcalc I prefer to use another syntax construction that goes like this: echo river = if(river == $old, $new, null()) | r.mapcalc That way you evaluate the variables $old and $new before sending it to r.mapcalc. There is no advantage to using the above form. Even if you use: r.mapcalc river = if(river == $old, $new, null()) the variables are still expanded by the shell. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] qgis + grass-plugin = gdal-problem (update)
Hi Achim, I build the opensuse packages in the Application:/Geo repository and will check this. Do you use the 32 bit or 64 bit packages for 11.1? regards, Otto On Mon, 02 Mar 2009 10:45:00 +0100 achim a...@jupiter.uni-freiburg.de wrote: Hi, thanks for answering and sorry for taking so long.. Im running suse 11.1 and I was installing both qgis and grass from the following repositories: http://teodori.org/repos/grass/openSuSE11.1/ and http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.1/ As said deinstalling the old and reinstalling of the packages via yast does not help. Now I'm using only grass, but I would really like to use the comfortable qgis in future too. Thanks, achim Zahid Parvez schrieb: On Sat, Feb 28, 2009 at 9:09 AM, Nikos Alexandris nikos.alexand...@felis.uni-freiburg.de mailto:nikos.alexand...@felis.uni-freiburg.de wrote: On Fri, 2009-02-27 at 13:39 +0100, achim wrote: Hi, I used the goe-repository files for installing grass (6.4) and grass63. Do I have to compile myself? Cant I clean old libraries by myself and reinstall grass from the repository? Thanks, achim Hi Achim! It's not clear to me which geo-repository you mean. Could you please be more specific? First: * Which operating system do you use? * Which exact commands did you use to install grass 6.4 and which to install grass 6.3? * Why do you need both, version 6.3 and 6.4? Now partially answering: * You are not forced to compile grass by yourself. There are binaries ready-to-(install)use. * Of course you can clean old libraries. If you installed grass from ubuntu's repository for example, it should be easy to clean everything by just removing it (preferably with sudo apt-get purge grass). BTW, Jachym Cepicky's repository [1] is AFAIK always more up-to-date than ubuntu's repositories. Kind regards, Nikos --- [1] http://les-ejk.cz/ubuntu/ ___ grass-user mailing list grass-user@lists.osgeo.org mailto:grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user if you use windows xp sp2 this may help. i got this from internet best zahid ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Determine surface areas
On 05/03/09 23:15, i...@the-masterplan.net wrote: Hi! I am still working on the extended problem and so far i have done the following. I created circles and sectors in autocad and imported the dxf file (first one sector at a time). The import didn't seem to work that well, so i converted lines to boundaries and used v.clean to get areas, and inserted a centroid with v.digit and created a rastermap with v.to.rast (source: val, and featuretype area). using the rastermap as mask I can use r.report or r.stats to get the waterarea/watercells. Because there are 160 of these areas i was wondering if there is a possibility to use all of the areas at once (or at least more than one at a time) assign some kind of an ID to every area and get the results separately for every area. trying to use more than one area at a time always got me the total stats for all areas. Just give each centroid a different category value (e.g. using v.category, or by hand using v.digit), then v.to.rast use=cat. Then r.stats/r.report should give you the result by category. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user