<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<DEFANGED_meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Tom,<br>
<br>
I purposely threw in that caveat because I assumed that a human would
have to decide what a storm pattern was. If an algorithm automatically
found storm cells of contiguous positive rainfall values, there might
be splinter cells a meteorologist would consider part of the same
pattern. Ergo, I would expect the user to zoom to a region with a
single rain event and mask out any areas they didn't consider part of
that storm. Then, a variation of the procedure below would do the
trick. As Hamish suggests, r.univar is probably better than r.volume.<br>
<br>
sincerely, chuck<br>
<br>
Thomas Adams wrote:<br>
<blockquote cite="mid42A0AFB6.60506@noaa.gov" type="cite">
<DEFANGED_meta http-equiv="Content-Type" content="text/html;">
<title></title>
Chuck,<br>
<br>
Does this assume you only have one raster map cell shape? What if there
are multiples, which is what I think Jason has? I think, then, you
would get a single center of mass for the cluster of separate cells.<br>
<br>
Tom<br>
<br>
<br>
Charles Ehlschlaeger wrote:<br>
<blockquote type="cite" cite="mid42A0AA28.9080109@wiu.edu">
<DEFANGED_meta content="text/html;charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
I don't have GRASS working on my computer to check this out, however,
here is a procedure to calculating the center of a shape:<br>
<br>
Assume you have a raster map "shape" where the value of 0 is at all
places w/out the shape and a positive value where the shape is located
at.<br>
<br>
1) Find the total volume of the shape w/:<br>
<br>
1a) r.mapcalc command function:<br>
one = "1"<br>
<br>
1b) r.volume d=shape clump=one<br>
<br>
(There should be a better way of doing this.)<br>
<br>
2) Calculate volumeOnAxis of shape in North-South dimension with the
r.mapcalc command:<br>
<br>
NSvolumeOn = shape * y()<br>
<br>
3) Calculate massOnAxis of shape in East-West dimension with the
r.mapcalc command:<br>
<br>
EWvolumeOn = shape * x()<br>
<br>
4) Find the total volume of NSvolumeOn with:<br>
<br>
r.volume d=
NSvolumeOn clump=one<br>
<br>
5) Find the total volume of EWvolumeOn with:<br>
<br>
r.volume d=
NSvolumeOn clump=one<br>
<br>
6) The coordinates of the center will be <br>
east = total volume of EWvolumeOn / volume of shape<br>
north = total volume of NSvolumeOn / volume of shape<br>
<br>
A little csh and awk programming could replicate Idrisi's center
program.<br>
<br>
<INSERT DISCLAIMERS ABOUT USING AT OWN RISK...><br>
<br>
sincerely, chuck<br>
<br>
Markus Neteler wrote:<br>
<blockquote cite="mid20050603142536.GI18457@thuille.itc.it"
type="cite">
<pre wrap="">On Thu, Jun 02, 2005 at 03:42:36PM -0400, Jason Horn wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Does anyone know of a way to calculate the center of a shape in a
raster file based on shape and pixel values? For example, imagine a
NEXRAD RADAR image showing a storm cloud. Could GRASS be used to
calculate the center of the cloud? I'm not having any luck finding a
grass raster function to do this.
</pre>
</blockquote>
<pre wrap=""><!---->
I did a quick google search for
nexrad storm cell identification
or
nexrad SCIT
which a couple of hits. Some programming might
be needed. I don't know if these algorithms are freely
available.
Markus
</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Chuck Ehlschlaeger, Associate Professor & GIS Center Director
Department of Geography, Western Illinois University
306C Tillman Hall, 1 University Circle, Macomb, IL 61455
<a class="moz-txt-link-abbreviated" href="mailto:cre111@wiu.edu">cre111@wiu.edu</a>, phone: 309-298-1841, fax: 309-298-3003</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Thomas E Adams
National Weather Service
Ohio River Forecast Center
1901 South State Route 134
Wilmington, OH 45177
EMAIL:        <a class="moz-txt-link-abbreviated"
href="mailto:thomas.adams@noaa.gov">thomas.adams@noaa.gov</a>
VOICE:        937-383-0528
FAX:        937-383-0033</pre>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Chuck Ehlschlaeger, Associate Professor & GIS Center Director
Department of Geography, Western Illinois University
306C Tillman Hall, 1 University Circle, Macomb, IL 61455
<a class="moz-txt-link-abbreviated" href="mailto:cre111@wiu.edu">cre111@wiu.edu</a>, phone: 309-298-1841, fax: 309-298-3003</pre>
</body>
</html>