Re: [GRASS-user] loop import+merge

2010-12-14 Thread Dr. Manfred Redslob
Am Dienstag, den 14.12.2010, 13:32 +0100 schrieb Patrick_schirmer:
> Hi,
> 
> Still trying to create an import and merging of various files via a 
> python-loop, as direct import is too heavy. I was searching on how to 
> add a flag"-o" in python some days ago.  Found out that it will work 
> with 'flags="o"' if I put it directly behind the command, but am still 
> not able to combine two flags (-o and --o).
> 
> Even though, it seems that the loop I tried with "v.patch" will not work 
> at all if input and output has the same filename. I would therefor have 
> to create a dummy-file that will have to be a copied at the end of each 
> iteration.
> 

Hi Patrick,

> Kind of:
> v.patch in=iterationresult,previousfinal out=temp
> v.copy in=temp out=previousfinal --overwrite

it must be

g.copy vect=temp,previousfinal

I guess g.copy don't know the -o flag.

Therefor you have _first_ remove the map:

g.remove vect=previousfinal
or you have to choose another mapname.

Manfred

> 
> Is there a command doing this "v.copy --overwrite"? Or does anyone have 
> any other ideas on how to solve this task. It really is essential that I 
> find any solution to this.
> 
> Thanks for your help,
> 
> Patrick
> 
> 
> script of loop###
> i=0
> while i<150:
>  i=i+1
>  i=str(i)
> 
>  grass.run_command(
>  'v.in.ogr', flags="o", dsn="PG:dbname=schirpat",
>  layer="sc.av_liegensch", output="GR_av_liegensch_poly"+i,
>  type="boundary,centroid", where="bfs="+i)
> 
>  grass.run_command(
>  'v.patch',flags="-o", 
> input="GR_av_liegensch_poly"+i+",GR_av_liegensch_poly", 
> output="GR_av_liegensch_poly")
> ___
> 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] List of existing values

2010-07-20 Thread Dr. Manfred Redslob
Am Dienstag, den 20.07.2010, 14:14 +0100 schrieb Nikos Dumakis:
> Greetings
> 
> 
> I have a raster map with a lot of values and I want to retrieve a list
> of the existing values. How can I do that in GRASS?
> Thanks
> Nikos

Hi Nikos,

r.stats will do this job

Best,

Manfred

> ___
> 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: r.mapcalc r.mapcalculator question

2010-06-16 Thread Dr. Manfred Redslob
Am Mittwoch, den 16.06.2010, 01:10 -0700 schrieb varunvarma:
> 
> Micha Silver wrote:
> > 
> > On 15/06/2010 16:45, Dr. Manfred Redslob wrote:
> >> Am Dienstag, den 15.06.2010, 06:39 -0700 schrieb varunvarma:
> >>
> >>> Hi, I am a new user to GRASS and have run into a problem while
> >>> processing
> >>> rasters
> >>>
> >>> I have 2 raster files (TIFFs) which I have loaded with GRASS in QGIS
> >>> 1.0.2
> >>> Kore. The rasters contain values of 0 and 1 and represent 2 time steps.
> >>> What
> >>> I wanted to do is either a simple addition of the 2 rasters or apply an
> >>> OR
> >>> operator between them. For this I used the r.mapcalc and r.mapcalculator
> >>> tool. However, the cell size of the resulting raster is increased from
> >>> 250m
> >>> to 2500m which leads to loss of fine scale information.
> >>>
> >>> Does anyone know why this is happening and what I could do to maintain
> >>> the
> >>> fine scale information?
> >>>
> >>> Thank you
> >>>  
> >> Hi however,
> >>
> >> please check the actual resolution with g.region -p. Is the result
> >> res=2500? If so, set region with g.region -ap res=250 or with g.region
> >> rast=inputrasterfile. You can controll it again with  g.region -p. After
> >> this settings run r.mapcalc again.
> >>
> >> Regards,
> >>
> >> Manfred
> >>
> >>
> > In addition, to do the same thing within QGIS, you can use the "Edit 
> > current region" button on the GRASS toolbar. Just enter the value you 
> > need in the N-S resolution and E-W text boxes.
> > 
> > Another note: I might suggest you upgrade to a newer version of QGIS.  
> > Version 1.4 (and soon to be released 1.5) have many improvements and bug 
> > fixes.
> > Regards
> > 
> >> ___
> >> grass-user mailing list
> >> grass-user@lists.osgeo.org
> >> http://lists.osgeo.org/mailman/listinfo/grass-user
> >>
> >> This mail was received via Mail-SeCure System.
> >>
> >>
> >>
> > 
> > 
> > -- 
> > Micha Silver
> > http://www.surfaces.co.il/
> > Arava Development Co.  +972-52-3665918
> > 
> > ___
> > grass-user mailing list
> > grass-user@lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/grass-user
> > 
> > 
> 
> Thank you all for your replies. I ran g.region to set the cell size (res) in
> GRASS 6.4.0 and then used r.mapcalc to do an addition between the rasters
> and it worked perfectly.
> 
> Just to understand the solution better, is there a reason why the cell size
> was changed when an addition was performed on the rasters OR was it that the
> cell size was changed when rasters were imported into GRASS?
> 
> Thank you,
> Varun

Hi Varun,

I do'nt know, at which time the resolution changed (maybe it's the
default-region of your location?: g.region -dp). But raster operations
within GRASS are using the actual region settings and the new map would
be created with this settings, independent of the input raster maps. So
it's possible to generate raster maps with a new (higher or lower)
resolution and also maps clipped to a part of the input maps (to sphere
of interest) to save disc space, or memory capacity.

So before working with rastermaps it would be usefull to controll the
region settings.

Best regards,

Manfred


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] r.mapcalc r.mapcalculator question

2010-06-15 Thread Dr. Manfred Redslob
Am Dienstag, den 15.06.2010, 06:39 -0700 schrieb varunvarma:
> Hi, I am a new user to GRASS and have run into a problem while processing
> rasters
> 
> I have 2 raster files (TIFFs) which I have loaded with GRASS in QGIS 1.0.2
> Kore. The rasters contain values of 0 and 1 and represent 2 time steps. What
> I wanted to do is either a simple addition of the 2 rasters or apply an OR
> operator between them. For this I used the r.mapcalc and r.mapcalculator
> tool. However, the cell size of the resulting raster is increased from 250m
> to 2500m which leads to loss of fine scale information.
> 
> Does anyone know why this is happening and what I could do to maintain the
> fine scale information?
> 
> Thank you

Hi however,

please check the actual resolution with g.region -p. Is the result
res=2500? If so, set region with g.region -ap res=250 or with g.region
rast=inputrasterfile. You can controll it again with  g.region -p. After
this settings run r.mapcalc again.

Regards,

Manfred


___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Running grass with two (physical) screens

2008-07-21 Thread Dr. Manfred Redslob
Am Montag, 21. Juli 2008 17:41 schrieb Rainer M Krug:
> Hi

Hi Rainer,

this way is nice! I use nvidia graphic card. Just use nvidia-settings -> 
switch to twinview.

Manfred

>
> I would like to run grass with two screens, so that the Map Display is
> on one screen, and the GIS Manager and Output window are on the other.
>
> Any suggestions on how to accomplish this?
>
> Thanks
>
> Rainer

-- 
Dr. Manfred Redslob

GDF Hannover bR
Gesellschaft fuer Datenanalyse und Fernerkundung
Kontakt: [EMAIL PROTECTED]
Internet: http://www.gdf-hannover.de
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] Patching raster maps produced by r.reclass

2008-07-11 Thread Dr. Manfred Redslob
Am Freitag, 11. Juli 2008 13:56 schrieb Jana K.:
> I have 2 raster maps in the same papset. I needed to complement the null
> values in the first map with values from the second. I used r.patch
> input=map1,map2 output=map3. The resulting map3, however, is an empty map.
> Can the fact that map1 and map2 resulted from r.reclass procedures (the
> original map on which reclass is based still exists) by the cause?

Hi Jana,

please check the actual region. If the region is outside from map1 ad map2 it 
must be a null-value map.

Try 
g.region -p rast=map1

r.patch in=map1,map2 out=map3

Maby thats the problem,

Manfred

>
> Thanks,
>
> Jana

-- 
Dr. Manfred Redslob

GDF Hannover bR
Gesellschaft fuer Datenanalyse und Fernerkundung
Kontakt: [EMAIL PROTECTED]
Internet: http://www.gdf-hannover.de
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user