|
|
| GeoCommunity Mailing List |
| |
| Mailing List Archives |
| Subject: | Re: [gislist] Rounding in Spatial Analyst |
| Date: |
07/08/2004 03:50:01 PM |
| From: |
Gregory Yetman |
|
|
Hi Marc,
The INT function truncates to whole numbers ('rounding towards zero'), to round values .5 or greater up use:
outgrid = int(ingrid + 0.5)
unless you have negative values that you need rounded, then use:
outgrid = int(con(ingrid lt 0, ingrid - 0.5, ingrid + 0.5))
Greg
---------------------------------------------------------------------- Gregory Yetman Center for International Earth Science Information Network (CIESIN) Columbia University URL: http://www.ciesin.columbia.edu/ e-mail: gyetman@ciesin.columbia.edu tel: (845) 365-8982 ----------------------------------------------------------------------
On Thu, 8 Jul 2004, Marc Allred wrote:
> I'm working in Spatial Analyst 8.3. What is the formula in raster > calculator that can make my grid values rounded to the decimal place? > Example, I have a grid value of 1,203.021302 and I would like for it to > show 1,203. > > Marc Allred > Northwest Piedmont COG > GIS Analyst > Phone: 336-761-2111 > Fax: 336-761-2112 > E-mail: mallred@nwpcog.org > > > _______________________________________________ > gislist mailing list > gislist@lists.geocomm.com > http://lists.geocomm.com/mailman/listinfo/gislist > > _________________________________ > This list is brought to you by > The GeoCommunity > http://www.geocomm.com/ > > Get Access to the latest GIS & Geospatial Industry RFPs and bids > http://www.geobids.com >
_______________________________________________ gislist mailing list gislist@lists.geocomm.com http://lists.geocomm.com/mailman/listinfo/gislist
_________________________________ This list is brought to you by The GeoCommunity http://www.geocomm.com/
Get Access to the latest GIS & Geospatial Industry RFPs and bids http://www.geobids.com
|
|

Sponsored by:

For information regarding advertising rates Click Here!
|