[GRASSGUI] Re: r.mapcalc

Michael Barton michael.barton at asu.edu
Mon Oct 22 11:32:50 EDT 2007


What kind of results are you hoping to get in the end? You say you want to
do line-of-sight analysis. It is increasingly unclear to me what are the
specific outcomes you are looking for: whether your x2y2 point is visible
from x1y1? a map of the cells between x1y1 and x2y2 that are visible when
you look from x1y1 to x2y2? something else? Running r.profile on a r.los map
that you have reclassified to binary would ID the visible cells between x1y1
and x2y2. You can visually tell if x2y2 is visible from x1y1. I can't tell
what you are trying to do.

Michael




On 10/22/07 5:31 AM, "ec.jkd at tpcsed.com" <ec.jkd at tpcsed.com> wrote:

> hi,
> i want tyo find a line of site between two co-ordinates x1,y1 to x2,y2
> then i wrote r.reclass input=map outpuy=mapout
>> then i specified two co-rdinates for two points
> but not able to get the output
> culd you tell me how to write using x1y1 and x2y2
> plz  
> 
> 
> Use reclassify interactively or recode interactively from the menu. Put the
>> name of the file you want to reclassify (for integers) or recode (for
>> floating point values) in the entry box. You'll need to specify and output
>> file too. 
>> 
>> Then enter your rules into the text box below and click "apply" or "run".
>> You'll need to know what the values are for your line (between point of
>> observer and what you want to see).
>> 
>> Recode rules:
>> 
>> line value min:line value max:1:1
>> rest value min:rest value max:0:0
>> 
>> Reclass rule:
>> 
>> [line value min]  thru [line value max] = 1
>> * = 0
>> 
>> Michael
>> 
>> 
>> On 10/21/07 11:30 PM, "ec.jkd at tpcsed.com" <ec.jkd at tpcsed.com> wrote:
>> 
>>> hi,
>>> for reclass/recode we need to type Title field also for the rule:
>>> can you tell me how to fill up that:help says
>>> Map type conversion
>>> To simply convert a raster between formats (eg. int to float) the user would
>>> use the first argument. For example
>>> 10:1500:0.1:15.0
>>> would convert an old raster with range between 10 and 1500 to a float raster
>>> with range bewteen 0.1 and 15.0.
>>> 
>>> Value replacement
>>> r.recode can be used to replace existing cell values by others. The
>>> formatting
>>> is as described above. In following example the values 1, 2 and 3 are
>>> replaced
>>> by 1.1, 7.5 resp. 0.4:
>>> 
>>>     r.recode in=oldmap out=newmap << EOF
>>>     1:1:1.1:1.1
>>>     2:2:7.5:7.5
>>>     3:3:0.4:0.4
>>>     EOF
>>> 
>>> can you explain me how to go about it like:
>>> 1. I have a dgn vector map which i have convetred it into raster
>>> 2. Now for finding line of sight i will take say two points..one with name
>>> "a"
>>> and another name"b" now how will i reclass or recode the values..and what
>>> dose
>>> this value actually mean?
>>> plz support me >
>>> 
>>> 
>>> 
>>> Jainita,
>>>> 
>>>> Create a map with the line of sight you want to analyze. Reclassify it
>>>> (r.reclass or r.recode) to make the cells in the line you want to analyze 1
>>>> and the rest of the cells 0.
>>>> 
>>>> Michael
>>>> 
>>>> 
>>>> On 10/21/07 10:40 PM, "ec.jkd at tpcsed.com" <ec.jkd at tpcsed.com> wrote:
>>>> 
>>>>> Hi,
>>>>> thank you for yr advice butcan you tell me how to prepare this binary file
>>>>> 
>>>>> Thanks,
>>>>> jainita> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Jainita,
>>>>>> 
>>>>>> Use the binary map setting to specify the area you want to do visibility
>>>>>> analysis for. It should be 1 where you want visibility/los calcuations
>>>>>> and
>>>>>> 0
>>>>>> where you don't want this calculated.
>>>>>> 
>>>>>> Michael
>>>>>> 
>>>>>> 
>>>>>> On 10/17/07 9:30 PM, "jainita" <ec.jkd at tpcsed.com> wrote:
>>>>>> 
>>>>>>> Hi,I tried with r.los but it gives visibility all over i.e in 360degree
>>>>>>> for
>>>>>>> the distance specified.
>>>>>>> But I want only between two points in a line i.e not 360 degree so can
>>>>>>> you
>>>>>>> help me with it.
>>>>>>> I would be really oblige if you help me since I am racking my mail a lot
>>>>>>> on
>>>>>>> this and still unable to find the solution
>>>>>>> Thanking you once again
>>>>>>> 
>>>>>>> -----Original Message-----
>>>>>>> From: Michael Barton [mailto:michael.barton at asu.edu]
>>>>>>> Sent: Wednesday, October 17, 2007 7:59 PM
>>>>>>> To: ec.jkd at tpcsed.com; atlasis at telecom.ntua.gr;
>>>>>>> rchirgwin at ozemail.com.au;
>>>>>>> silvia.franceschi at ing.unitn.it; josh_0882 at yahoo.com; saldinet at yahoo.es;
>>>>>>> nkdiitd2002 at gmail.com; grassuser at grass.itc.it;
>>>>>>> grassuser_request at grass.itc.it
>>>>>>> Subject: Re: r.mapcalc
>>>>>>> 
>>>>>>> Use r.los for line of site calculations.
>>>>>>> 
>>>>>>> Michael
>>>>>>> 
>>>>>>> 
>>>>>>> On 10/17/07 5:36 AM, "ec.jkd at tpcsed.com" <ec.jkd at tpcsed.com> wrote:
>>>>>>> 
>>>>>>>> hi,
>>>>>>>> i am working on grass and want to know how r.mapcalc can be used for
>>>>>>>> calculation of pat_map/mask.
>>>>>>>> syntax says---------------r.mapcalc pat)mkap="if(where_you_want,1, 0)"
>>>>>>>> for
>>>>>>>> creating a map which can be used to calcualte line of sight between two
>>>>>>> points
>>>>>>>> can anyone elaborate on it with an eg:say i want to know what all is
>>>>>>>> beign
>>>>>>>> seen between any two co-ordinate in map.
>>>>>>>> Please help,i am doing for the first time
>>>>>>>> 
>>>>>>>> Thanking You,
>>>>>>>> Jainita
>>>>>>> 
>>>>>>> __________________________________________
>>>>>>> Michael Barton, Professor of Anthropology
>>>>>>> Director of Graduate Studies
>>>>>>> School of Human Evolution & Social Change
>>>>>>> Center for Social Dynamics & Complexity
>>>>>>> Arizona State University
>>>>>>> 
>>>>>>> phone: 480-965-6213
>>>>>>> fax: 480-965-7671
>>>>>>> www: http://www.public.asu.edu/~cmbarton
>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> __________________________________________
>>>>>> Michael Barton, Professor of Anthropology
>>>>>> Director of Graduate Studies
>>>>>> School of Human Evolution & Social Change
>>>>>> Center for Social Dynamics and Complexity
>>>>>> Arizona State University
>>>>>> 
>>>>>> phone: 480-965-6213
>>>>>> fax: 480-965-7671
>>>>>> www: http://www.public.asu.edu/~cmbarton
>>>>>> 
>>>>>> 
>>>> 
>>>> __________________________________________
>>>> Michael Barton, Professor of Anthropology
>>>> Director of Graduate Studies
>>>> School of Human Evolution & Social Change
>>>> Center for Social Dynamics & Complexity
>>>> Arizona State University
>>>> 
>>>> phone: 480-965-6213
>>>> fax: 480-965-7671
>>>> www: http://www.public.asu.edu/~cmbarton
>>>> 
>>>> 
>>>> 
>> 
>> __________________________________________
>> Michael Barton, Professor of Anthropology
>> Director of Graduate Studies
>> School of Human Evolution & Social Change
>> Center for Social Dynamics & Complexity
>> Arizona State University
>> 
>> phone: 480-965-6213
>> fax: 480-965-7671
>> www: http://www.public.asu.edu/~cmbarton
>> 
>> 
>> 

__________________________________________
Michael Barton, Professor of Anthropology
Director of Graduate Studies
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton





More information about the grass-gui mailing list