Re: [GRASS-user] online documentation is off

2008-01-27 Thread Markus Neteler
On Jan 26, 2008 7:01 PM,  <[EMAIL PROTECTED]> wrote:
> I only know (and have installed on firefox) this plug-in...
>
> http://geolocatefox.mozdev.org/
>
> But rarely I see geo-location information about websites.

OK, good pointer :)



tells me the server IP, and

http://www.hostip.info";>
 http://api.hostip.info/flag.php?ip=WWW.XXX.YYY.ZZZ";
ALT="GRASS Server flag">


would give me the right flag (or the name with
http://api.hostip.info/get_html.php?ip=WWW.XXX.YYY.ZZZ
).

Now I need to put both together...

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


[GRASS-user] how to supress warnings ???

2008-01-27 Thread Patrick Giraudoux

Dear all,

I am using some functions in a loop and would like to suppress warnings 
such as:


WARNING: Vector map  already exists and will be overwritten

In this case the call that trigger the warning is:

v.extract -t in=$vector out=essaisV list=$count type=point --o --q # 
point extraction


Is there a way to do it ?

Patrick

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


Re: [GRASS-user] how to supress warnings ???

2008-01-27 Thread Martin Landa
Hi,

2008/1/27, Patrick Giraudoux <[EMAIL PROTECTED]>:
> I am using some functions in a loop and would like to suppress warnings
> such as:
>
> WARNING: Vector map  already exists and will be overwritten
>
> In this case the call that trigger the warning is:
>
>  v.extract -t in=$vector out=essaisV list=$count type=point --o --q #
> point extraction

redirect stderr to /dev/null, e.g.

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 2>/dev/null

Regards, Martin

-- 
Martin Landa <[EMAIL PROTECTED]> * http://gama.fsv.cvut.cz/~landa *
___
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


Re: [GRASS-user] how to supress warnings ???

2008-01-27 Thread Patrick Giraudoux

Martin Landa a écrit :

Hi,

2008/1/27, Patrick Giraudoux <[EMAIL PROTECTED]>:
  

I am using some functions in a loop and would like to suppress warnings
such as:

WARNING: Vector map  already exists and will be overwritten

In this case the call that trigger the warning is:

 v.extract -t in=$vector out=essaisV list=$count type=point --o --q #
point extraction



redirect stderr to /dev/null, e.g.

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 2>/dev/null

Regards, Martin

  

When I do this in the script:

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 
2>/dev/null# point extraction


executing the programme, I get:

/home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#: 
Permission denied


Cheers,

Patrick






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


Re: [GRASS-user] how to supress warnings ???

2008-01-27 Thread Markus Neteler
On Jan 27, 2008 2:19 PM, Patrick Giraudoux
<[EMAIL PROTECTED]> wrote:
...
>  When I do this in the script:
>
>   v.extract -t in=$vector out=essaisV list=$count type=point --o --q
> 2>/dev/null# point extraction
>
>  executing the programme, I get:
>
>  /home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#:
> Permission denied

Try to change
... /dev/null#point extraction
to
... /dev/null #point extraction

White space is needed here.

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


Re: [GRASS-user] how to supress warnings ???

2008-01-27 Thread Patrick Giraudoux

Markus Neteler a écrit :

On Jan 27, 2008 2:19 PM, Patrick Giraudoux
<[EMAIL PROTECTED]> wrote:
...
  

 When I do this in the script:

  v.extract -t in=$vector out=essaisV list=$count type=point --o --q
2>/dev/null# point extraction

 executing the programme, I get:

 /home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#:
Permission denied



Try to change
... /dev/null#point extraction
to
... /dev/null #point extraction

White space is needed here.

Markus


  

Works fantastic ! Thanks...

Patrick

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


[GRASS-user] how to get categoriy values after v.reclass?

2008-01-27 Thread Patrick Giraudoux
I had a point vector map of three points (name = 'samples') where the 
category values were 1, 100, 200


I reclassified it as following:

v.reclass input=samples output=samples2 rules=reclasscode

where reclasscode is this file:
> cat reclasscode
cat 1
where cat=1
cat 2
where cat=100
cat 3
where cat=200

Then, I cannot find a way out to read the values of cat in the new file 
'sample2'. Obviously v.info could just give the names of the columns in 
'samples':


> v.info -c map=samples
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|ID
DOUBLE PRECISION|x
DOUBLE PRECISION|y

but with the new file
> v.info -c map=samples2
ERROR: Database connection for map  is not defined in DB file

and anyway, this is not exactly what I would like to get.  I would get 
the value of the categories for each point... and cannot make it 
whatever the vector file...


Any hint welcome !

Patrick








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


[GRASS-user] Re: how to get categoriy values after v.reclass?

2008-01-27 Thread Patrick Giraudoux

Patrick Giraudoux a écrit :
I had a point vector map of three points (name = 'samples') where the 
category values were 1, 100, 200


I reclassified it as following:

v.reclass input=samples output=samples2 rules=reclasscode

where reclasscode is this file:
> cat reclasscode
cat 1
where cat=1
cat 2
where cat=100
cat 3
where cat=200

Then, I cannot find a way out to read the values of cat in the new 
file 'sample2'. Obviously v.info could just give the names of the 
columns in 'samples':


> v.info -c map=samples
Displaying column types/names for database connection of layer 1:
INTEGER|cat
INTEGER|ID
DOUBLE PRECISION|x
DOUBLE PRECISION|y

but with the new file
> v.info -c map=samples2
ERROR: Database connection for map  is not defined in DB file

and anyway, this is not exactly what I would like to get.  I would get 
the value of the categories for each point... and cannot make it 
whatever the vector file...


Any hint welcome !

Sorry to answer to myself, but it looks like

v.category input=samples2 option=print

makes it !

Patrick

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


[GRASS-user] aggregate a field across features and then display related charts and histograms

2008-01-27 Thread David Epstein
Hello,


I have looked over a lot of documentation but am still having trouble
with this task. I hope somebody on the list can point me in the right
direction!

I have a table of land parcels as polygon features in a postGIS
database. I have another table of regions in the same postGIS database.
There are between 20 and 50 parcels to a region. I can access the data
without a problem (thanks to some helpful people!)

I want to create several maps that aggregate/summarize the parcel data
and display them as pie-charts and histograms at the centroid of each
region. For example:  

1. HISTOGRAM of the size of all parcels in the region. The data for this
is stored in a single field for each parcel. I just need to understand
how to identify the field, send it to the histogram, and display it at
the centroid of the region layer.

2. PIE-CHART where each slice represents the total area owned by a
particular class of owner. This is more complicated. EACH parcel has an
area column for each of 7 classes of owners. So, I believe I need to
keep separate tallies and send them all to a pie-chart function--but I
am not sure how...

Finally, is the best way to actually KEEP all this data to add new
columns to the region table with SQL?


thank you in advance,
-david

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


[GRASS-user] v.extract how to extract points one by one following their FID number

2008-01-27 Thread Patrick Giraudoux

Dear all,

Now, I am very happy  with a programme running (this is my first real 
programme in GRASS with a GUI, etc) that can sweep multiple radius 
buffers over points selected one by one from a point vector map and 
save  the pixel count of each category of the overlapping raster in  a 
text file. However, the point selection process is based on the category 
values of the vector file. Example:


v.extract -t in=$vector out=essaisV list=$count type=point --o --q 
2>/dev/null # point extraction


where $count is incremented from 1 to the number of points.

This could be messy if two different points have the same category value 
(I currently manage to get category value unique and ranging from 1 to 
the number of points, so that each point is extracted alone).


I wonder if it would be possible to make it in a safer way, e.g. to 
extract vectors as does v.extract but with a selection grounded on the 
unique FID number of each point (and not on its category value as e.g. 
with 'list=1' in v.extract). This means to read the FID numbers of a 
point vector map and then to extract stepwise each vector point to a new 
vector map calling it via its FID.


Any hint appreciated,

Cheers,

Patrick



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


Re: [GRASS-user] r.regression.line... differences with regression function LINEST in openoffice.org-calc (?)

2008-01-27 Thread Markus Neteler OSGeo

hi Nikos,

I have replicated (partially) your experiment:

GRASS 6.3.svn (pat): > cat mapA.asc
north: 2
south: 0
east: 3
west: 0
rows: 2
cols: 3
326 641 1336
2020 3197 3484

GRASS 6.3.svn (pat): > cat mapB.asc
north: 2
south: 0
east: 3
west: 0
rows: 2
cols: 3
432 850 931
1956 2582 2622

r.in.ascii mapA.asc out=mapA
r.in.ascii mapB.asc out=mapB
g.region w=0 e=3 s=0 n=2 res=1 -p

r.regression.line map2=mapA  map1=mapB -g
 100%
a=-276.162
b=1.35079
R=0.979519
N=6
F=-0.827183
medX=1562.17
sdX=866.145
medY=1834
sdY=1194.44

# note the new -s flag for slow but accurate computation in
# case of FP maps

To compare, I run the same in R-stats:
> library(spgrass6)
> maps <- readRAST6(c("mapA","mapB"), cat=c(FALSE,FALSE))
> names(maps) <- c("mapA","mapB")
> mapA <- as.vector(maps$mapA)
> mapB <- as.vector(maps$mapB)
> lm(mapA ~ mapB)
Call:
lm(formula = mapA ~ mapB)

Coefficients:
(Intercept) mapB
   -276.1621.351

> summary(lm(mapA ~ mapB))

Call:
lm(formula = mapA ~ mapB)

Residuals:
  1   2   3   4   5   6
  18.62 -231.01  354.57 -345.99  -14.58  218.39

Coefficients:
 Estimate Std. Error t value Pr(>|t|)
(Intercept) -276.1615   247.9893  -1.114 0.327852
mapB   1.3508 0.1388   9.729 0.000625 ***
---
Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 294.6 on 4 degrees of freedom
Multiple R-Squared: 0.9595, Adjusted R-squared: 0.9493
F-statistic: 94.66 on 1 and 4 DF,  p-value: 0.0006249

It would be good to have a bit more statistics in r.regression.line.

Best,
Markus



Nikos Alexandris wrote:
> 
> I have submitted some comments upon the documentation of
> the "r.regression.line" script in
> http://wald.intevation.org/tracker/?func=detail&aid=552&group_id=21&atid=207
> 
> Now I have 2 questions.
> 
> Apologies if I miss some obvious things but I am confused!
> 
> Here it goes:
> 
> 1. I don't understand why (in lines 84 and 85 in the
> r.regression.line script) "sumsqX=sumsqX/tot" and
> "sumsqY=sumsqY/tot" ?
> 
> 2. I can't understand the differences in the following... :
> I created two raster maps with the same MASK, each
> containing only 6 pixels with the following values:
> 
> mapA: 326 641 1336 2020 3197 3484
> mapB: 432 850  931 1956 2582 2622
> 
> For mapA "r.univar" gives:
> n: 6
> minimum: 326
> maximum: 3484
> range: 3158
> mean: 1834
> mean of absolute values: 1834
> standard deviation: 1194.44
> variance: 1.4267e+06
> variation coefficient: 65.1278 %
> sum: 11004)
> 
> For mapB... :
> n: 6
> minimum: 432
> maximum: 2622
> range: 2190
> mean: 1562.17
> mean of absolute values: 1562.17
> standard deviation: 866.145
> variance: 750207
> variation coefficient: 55.4451 %
> sum: 9373)
> 
> In openoffice calc (some of) the respective results are:
> 
> For mapA:
> MIN: 326
> MAX: 3484
> AVERAGE: 1834
> STDEV: 1308,45
> VAR: 1,71E+06
> SUM: 11004
> 
> For mapB:
> MIN: 432
> MAX: 2622
> AVERAGE: 156217
> STDEV: 948,81
> VAR: 9,00E+05
> SUM: 9373
> 
> 
> Based on r.regression.line I get
> 
> for map1=mapA and map2=mapB:
> 
> a  b  R  N  F medX  sdX  medY  sdY
> 0.000458151 0.809242 0.99157 1021726 -0.98321 0.01077
> 5.3038 0.00917369 4.32854
> 
> and
> 
> for map1=mapB and map2=mapB:
> a  b  R  N  F medX  sdX  medY  sdY
> -0.000375823 1.21498 0.99157 1021726 -0.98321 0.00917369
> 4.32854 0.01077 5.3038
> 
> "R" is Pearson's correlation coefficient (as correctly
> defined in the script "r.regression.line" in line 83 but
> wrongly expressed as "sumXY - sumX*sumY/tot" in the
> print-out in line 101).
> 
> In openoffice-calc I get for these:
> MapAMapB
> 326   432 1,350792Slope m 
> 641   850 0,138835standard error of the slope 
> 1336  931 0,959458RSQ (Square of "r")
> 2020  195694,662802   4,00F value from the variance
> analysisstd error of regression for Y
> 3197  25828213134,001379  sum of squared deviation of
> estimated Y values from their linear mean 
> 3484  2622
> 
> or
> 
> MapBMapB
> 432   326 0,710293Slope m 
> 850   641 0,073004standard error of the slope 
> 931   13360,959458RSQ 
> 1956  202094,662802   4,00F value from the variance
> analysisstd error of regression for Y
> 2582  31974318750,949062  sum of squared deviation of
> estimated Y values from their linear mean 
> 2622  3484
> 
> 
> (How is really r.regression.line functioning? Trying to
> interpret the script is not that easy for me since I lack
> of some basics in scripting)
> 
> 
> Thank you,
> 
> Nikos.
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problems-with-v.external-tp14154685p15124758.html
Sent from the Grass - Users mailing list archive at Nabble.com.

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

Re: [GRASS-user] Trouble using two screens

2008-01-27 Thread John C. Tull

Kurt,

I do the same thing on Leopard, and I do not have any problems. It  
could be one of the myriad issues with X11 in Leopard. Consider  
installing the X11 update from below. (I have done that myself.) Let  
us know if it works for you.


http://trac.macosforge.org/projects/xquartz

John

On Jan 26, 2008, at 9:49 PM, Kurt Springs wrote:


Hi folks,

I was looking at some work this evening using GRASS 6.3.  I use two  
monitors that run as a continuous unit so they act as one monitor.   
Once GRASS was running, I tried to shift a few GRASS windows out of  
the way and they seem to get stuck between then two monitors.  I can  
get most of the window onto my second monitor, but  I can't move it  
completely onto the second screen.  My other programs are working  
fine.  I recently upgraded to OS X 10.5.1 Leopard.  Could this have  
something to do with it?


Kurt
___
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] Page 37 "Open Source GIS" by Neteler & Mitasova

2008-01-27 Thread Matt
I am having trouble creating a new project with Grass using the GUI.
Perhaps someone could clarify section 3.2 of the above book.  Let's assume I
have created /home/me/grassdata and I have downloaded the geod_pts_spm.zip
to my desktop.

Next in the terminal, I type grass -gui and see the Grass startup window and
click the Georeferenced file button under Define new location.  The window
which pops up asks for three inputs as the book states.  Seems simple
enough, but after trying several variations I am still unable to get it to
work.  Where do I unzip geod_pts_spm.zip before the new location is
created?  Using the mync_spm example in the book and assuming the location
of grassdata above, what do I enter for
** Name of new location
** Path to new location
** Path to georeference file?

I believe when everything is complete I should have
/home/me/grassdata/mync_spm and several folders below mync_spm, but just to
be sure could you show me what the directory structure should look like
after the location is created?

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


Re: [GRASS-user] Trouble using two screens

2008-01-27 Thread Kurt Springs

Thanks John,

That did the trick.  My windows migrate between monitors easily now.

Kurt

On Jan 27, 2008, at 6:55 PM, John C. Tull wrote:

Kurt,

I do the same thing on Leopard, and I do not have any problems. It  
could be one of the myriad issues with X11 in Leopard. Consider  
installing the X11 update from below. (I have done that myself.) Let  
us know if it works for you.


http://trac.macosforge.org/projects/xquartz

John

On Jan 26, 2008, at 9:49 PM, Kurt Springs wrote:


Hi folks,

I was looking at some work this evening using GRASS 6.3.  I use two  
monitors that run as a continuous unit so they act as one monitor.   
Once GRASS was running, I tried to shift a few GRASS windows out of  
the way and they seem to get stuck between then two monitors.  I  
can get most of the window onto my second monitor, but  I can't  
move it completely onto the second screen.  My other programs are  
working fine.  I recently upgraded to OS X 10.5.1 Leopard.  Could  
this have something to do with it?


Kurt
___
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