Monthly Archives: January 2008

Advanced Areal Weighted Interpolation by ArcView 9.2 – draft version

Part III Advanced areal weighted interpolation

Zhuotong Nan (南卓铜) ([email protected])

Motivation and objective

ArcView 9.2 comes with some basic interpolation approaches, for example, inverse distance weighted, Kringing, etc. In some cases, we want interpolate based on areal weighted. For example, Radar measurement can produce rainfall data over a study area. In order to use those Radar rainfall in hydrological model, e.g., VIC model, with a 1/8 degree spatial resolution, we need to do interpolation from a higher resolution, e.g., 4km by 4km. As shown in Figure 1, each grey cell has a measured value from Radar. We would like to generate an appropriate value for a VIC cell which might cover several Radar cells. In this part, we will illustrate an areal weighted approach.

clip_image002[8] clip_image004[8]

Figure 1 Radar rainfall cells and 1/8 deg VIC cells

1. Create VIC grid polygons

Install Fishnet script with ArcView 9.2

ArcView 9.2 comes with a fishnet function (Data Management Tools → Feature Class → Create Fishnet) which is capable of generating a regular grid lines. However due to the limitation of ArcView license, it’s hard to implement conversion from polyline to polygon which is necessary to do areal weighted interpolation to be introduced in this section. Therefore, we will employ a free yet powerful script from ArcScripts website.

  • Get this free script from http://arcscripts.esri.com/details.asp?dbid=12807. Unzip it to any location. We will see fishnet.dll in this location.
  • Start ArcMap with a new document.
  • Open Customize… dialog (Tools → Customize…), in Commands tab click Select from files… button to load fishnet.dll. You will see,

clip_image006[6]

Figure 2 Customization dialog

Drag Create Fishnet to any place on toolbar. You will see clip_image008[14] on toolbar. Close Customize dialog.

Note, to uninstall the script, you can open Customize dialog again, and drag fishnet icon clip_image008[15] on toolbar to any place except toolbar.

Create 1/8 degree VIC grid polygons

VIC is a macroscale hydrologic model that solves full water and energy balances. It runs on basis of VIC grid. See http://ldas.gsfc.nasa.gov/LDAS8th/LDASspecs/LDASspecs.shtml for details of grid extent. We will generate VIC grid polygons using Fishnet utility download from ArcScripts in a scale of 1/8 degree.

  • Open Create Fishnet utility (clip_image008[16]).
  • Configure parameters as following figure.

clip_image010[6]

Figure 3 Parameters for creating 1/8 degree VIC grid

  • Wait its completion. This might take a couple of minutes. A polygon shapefile “vicgrd8.shp” in geographic coordinate system (i.e., longitude and latitude, specified by GCS_North_American_1927 parameter) will be generated upon its completion.
Reproject VIC grid polygons to Albers equal-area projection system
  • Run Feature project utility under Data Management Tools → Projections and Transformations → Feature → Project in ArcToolbox. Configure parameters as following,

clip_image012[6]

Figure 4 Reproject to Albers Equal Area projection system

The produced vicgrd8_alb.shp now is in Albers Equal Area projection system. Note here we specified a transformation method to convert NAD_1927 to NAD_1983. Remember vicgrd8.shp is in NAD_1927 system and now vicgrd8_alb.shp is in NAD_1983 system.

  • Close ArcMap without saving the current document.

2. Generate polygons for XMRG radar data file

xster=hrapx*4762.5 – 401*4762.5
yster=hrapy*4762.5-1601*4762.5

Copy 0703200407z.asc to 0703200407z_ster.asc. Then open 0703200407z_ster.asc using any text editor, change its header to,

ncols 335
nrows 159
xllcorner -161925
yllcorner -6372225
cellsize 4762.5

Save 0703200407z_ster.asc.

  • Convert 0703200407z_ster.asc to binary Grid file. In Command Line Window, run

ASCIIToRaster c:workspacelab2703200407z_ster.asc c:workspacelab2g0703200407z FLOAT

  • Define Polar Stereographic Coordinate System for g0703200407z grid file.

In ArcCatalog, right click g0703200407z to open its Properties window. Navigate to Spatial Reference section, click Edit… to define its spatial reference. Choose Define the coordinate system interactively. Select Stereographic (Polar view) and configure it as shown below.

clip_image014[4] clip_image016[4]

Figure 5 Parameters for Polar Ster projection system

  • Convert raster to polygon

The conversion from raster to polygon only support grid file in integer. To do this, run following commands in Command Line Window.

Times_sa c:workspacelab2g0703200407z 100 c:workspacelab2g07032004_100

Int_sa c:workspacelab2g07032004_100 c:workspacelab2g07032004int

At this point, the produced g07032004int is already an integer grid file.

RasterToPolygon c:workspacelab2g07032004int c:workspacelab2g0703200407_poly NO_SIMPLIFY VALUE

A field “GRIDCODE” in the generated polygon (g0703200407_poly) is corresponding to cell values in g07032004int, which is 100 times real rainfall value.

  • Project XMRG polygons to Albers projection system

Using Data Management Tools → Projections and Transformations → Feature → Project in ArcToolbox to project g0703200407_poly in Polar Stereographic coordinate system to g0703200407_alb in Albers Equal Area Coordinate System. This target coordinate system can be imported from vicgrd8_alb.shp.

3. Calculate area contribution to each VIC cell

Calculate area for each VIC cell

Using CalculateAreas command to calculate area for each VIC cell in Command Line Window.

CalculateAreas c:workspacelab2vicgrd8_alb.shp c:workspacelab2vicgrd8_alb_area.shp

The field “F_AREA” in vicgrd8_alb_area.shp indicates area in square meter.

Overlay

Intersect utility is used to calculate areal contribution from XMRG polygons to each VIC cell.

  • First we will clip the whole VIC grid shapefile with XMRG polygons extent. In Command Line Window,

Workspace c:workspacelab2
Clip_analysis vicgrd8_alb_area g0703200407_alb c:workspacelab2vicgrd8_clp.shp

  • In Arctoolbox, run Analysis Tools → Overlay → Intersect with input parameters specified as below.

clip_image018[4]

Figure 6 Intersect input parameters

  • Start ArcMap with a new document. Add intersect.shp. Save map document into c:workspacelab2partIII.mxd.
  • Open intersect.shp attribute table.

clip_image020[4]

Figure 7 Attribute table of intersect.shp

Here FID_vicgrd and F_AREA come from VIC cells, while FID_g07032 and GRIDCODE come from XMRG polygon file. FID_vicgrd uniquely represents each VIC cell whose area is show in F_AREA field. GRIDCODE is actually equal to 100 * rainfall.

Querying attribute, for example FID_vicgrd = 1400, will extract all small polygons consisting a VIC cell.

Calculate areal weighted rainfall
  • Add a new field VIC_AREA with values come from F_AREA.

Open intersect.shp’s attribute table, Click Options → Add Field…

clip_image022[4]

Figure 8 Add a new field

Click the header of VIC_AREA column to select this field, right click it then select Field Calculator…, Yes upon warning message. Input [F_AREA] in the lower textbox then click OK to start calculation.

clip_image024[4]

Figure 9 Field calculator

  • Calculate area by running CalculateAreas in Command Line Window.

CalculateAreas intersect c:workspacelab2inters_area

  • Add a new field named “percentage” in double type to inters_area.shp.
  • Calculate [percentage] = [F_AREA] * [GRIDCODE]/100 / [VIC_AREA].

clip_image026[4]

Figure 10 Calculate Percentage field

  • Export areal weighted rainfalls upon each VIC cell

Make inters_area layer visible, and make sure there is no selection in this layer. Otherwise use clip_image028[4] on the Tools toolbar to clear any existing selection. In ArcToolbox, run Analysis Tools → Statistics → Summary Statistics to calculate rainfalls cell by cell.

clip_image030[4]

Figure 11 Summary statistics

Link interpolated rainfall data to VIC cells

  • Make vicgrid8_clp.shp visible and be topmost. Link this layer’s attribute table to rainfalls.dbf by using context menu → Joins and Relates → Join. In Join Data window, enter inputs as shown below,

clip_image032[4]

Figure 12 Join to rainfalls.dbf

  • Export vicgrd8_clp to vicgrd8_rainfall.shp. The output shapefile will physically contain rainfall values (stored in field SUM_percen).
  • Save partIII.mxd.
  • Project vicgrd8_rainfall to rainfall_geo.shp.
  • Add an alias “Rainfall” to field “SUM_Percen”. This makes the field name more straightforward.

clip_image034[4]

Figure 13 Make field name self-explanatory

In order to use in combination with other raster, we can also convert this polygon shapefile to raster using FeatureToRaster command in Command Line Window.

4. Visualization

  • Open partIII.mxd, switch all layers off except rainfall_geo. Set current data framework coordinate system to GCS_North_American_1983 using menu View→Data framework properties…→Coordinate System.
  • Open rainfall_geo layer properties window, make symbology settings same as below. You can also choose a different color schema for this.

clip_image036[4]

Figure 20 Symbology

  • Export map for submission. See Figure 21 for reference.

clip_image038[4]

Figure 21 Exported map

Conclusion

Although ArcView 9.2 has already included some basic interpolation approaches, it turns out in many cases hard to meet our specific requirements. This handout walks through how to interpolate Radar rainfall data to 1/8 degree VIC grid, illustrating necessary steps to implement areal weighted interpolation approach using ArcView. This handout also show us essential GIS operations such as project, clip, intersect, export, manipulate attribute table, link feature class to external table, etc, as well as making use of third party script.

(Http://nzt.spaces.live.com)

(转载请保持信息的完整,并加以适当引用)

SimCity开源了

On January 10 2008 the SimCity source code was released under the free
software GPL 3 license under the name Micropolis.

http://en.wikipedia.org/wiki/SimCity (国内可能要加代理才能访问)
http://simcitysocieties.ea.com/about.php?languageCode=1

COSPAR Abstract Reminder: 50th Anniversary Assembly

COSPAR的第一个主题是遥感

The 37th Scientific Assembly of the Committee on Space Research (COSPAR) will bring together approximately 2000 scientists and engineers from the world over to present the latest results in 96 symposia and special events covering all areas of space science.

Montreal, Canada
13 – 20 July 2008

Scientific program and abstract submission:
http://www.cospar-assembly.org

– Abstract deadline: 17 February 2008
Registration and hotel reservations:
http://www.cospar2008.org

– Early registration deadline: 1 June 2008
The program for distinguished interdisciplinary and 50th anniversary lectures is
now available and may be consulted at:
http://www.cospar-assembly.org

Please do not hesitate to forward this message to colleagues who may be
interested in submitting an abstract.

We look forward to your participation in COSPAR’s 50th anniversary Assembly.

Yours sincerely,

COSPAR Secretariat

你们看,天气很晴朗

一个叫姜岩的女孩平时喜欢说的,你们看,天气很晴朗。不过她因为失败的婚姻服毒失败又跳楼了。很多人死过一次后就不会再死了,但她又在几天后选择了第二次。也许婚姻家庭对她就意味着全部。只为她不值,那个男人,甚至那家人都太糟糕了。
她的博客记录了她决定自杀前二个月的全部心情,写的很平静,让人看的很沉重。
http://orionchris.spaces.live.com/default.aspx
这里还有一个她姐姐的纪念站,可以帮助大家对整个事情有个完整的了解。
http://orionchris.cn/
看了感动的一篇文章,完整介绍了姜岩自杀前的心理历程
http://bbs.muwen.com/topic701/701212.htm
http://www.tianya.cn/new/publicforum/Content.asp?idWriter=0&Key=0&strItem=funinfo&idArticle=1055802&flag=1

如她姐姐说的,得尊重她的选择。不过对大家要讲的是,还是要热爱生命。

The Tenth International Symposium on High Mountain Remote Sensing Cartography

Organisers: International Centre for Integrated Mountain Development (ICIMOD)
in cooperation with the European Space Agency (ESA)
Dates: September 8-11, 2008
Venue: ICIMOD, Kathmandu, Nepal

Tentative Schedule
Deadline for submission of abstracts: February 1, 2008
Notification of acceptance: April 1, 2008
Early registration deadline: May 1, 2008 (Registration begins from April 1, 2008)
Late registration deadline: June 1, 2008
Camera-ready paper: September 8, 2008
Symposium: September 8- 11, 2008
Field Excursion: September 12- 19, 2008

 

第二届国际数字地球学会

第二届国际数字地球学会——地球信息科学:全球变化研究的工具将于2008年11月12-14日联合
地理信息科学学会在德国的波茨坦城市召开数字地球高峰会议。

会前重要日期2008. 3.15  投稿文章摘要(400字内,以word格式)提交最后期限

              2008. 5. 1   发布接收函

              2008. 7. 1   提前注册最后期限

              2008. 7.30  投稿文章全文提交最后期限

注册及参会费用

提前注册(200871之前)/延迟注册(200871之后及现场注册)

          普通: 150欧元/200欧元

          GfGI ISDE会员: 125 欧元/175欧元

          学生:75欧元/100欧元

更多信息请查询网站:www.digitalearth-isde.org (国际数字地球学会)www.gfgi.de (地球信息科学学会),

会议网站www.isde-summit-2008.org

终于将基金07年度进展报告搞完了

忙了一周,终于将2个基金07年度进展报告按时提交上去了,这边的L老板已经对我very
disappointed了,如果花的时候再多一点,估计要抓狂了。在美国做研究压力真是很大
的,有句老话说的说错,万恶的资本主义国家里,雇主都使劲剥削着受雇人员,科研行
当的老板们也使劲push下面的人干活,每周要meeting一次,每次要一两个小时,每周
还要有个group meeting,讨论进展。恨不得大家7/24的干活,而不必付更多的工资。
不过好在以后国内的事象这样需要比较长时间来做的,不会常出现,这边的工作还可以
比较focused了。我还是比较喜欢concentrate on到某件事情,深入做些东西。08年也
应该多发点paper了,博士毕业后基本上是混过来的,事干了不少(我相信同事们都还
是看到的),但见成绩的东西都没有出来,自己也郁闷。这边的事情怎么说还是比较有
challenge的,老板虽然比较tough,但学术水平还是比较high的,在这个小圈子里还是
有点名气。
(不要嘲笑我写的夹杂英文了,现在还处在英语加强阶段,这样整会有帮助的了。)

可笑的ARP财务系统

据说这个arp系统花了纳税人n多的钱才开发的,在中科院等几家单位试用,还据说以后
要在全国推广,谁知道呢。今天因为填项目的进展报告,从arp上下了06-07的经费情
况(系统生成的excel文件),那叫一团乱呀,反正俺们几个好歹都是硕士博士的没看
懂的,到2008.1的余额居然说是-100多万,俺居然超支了100多万? 不能不让人感叹,
真是好高的水平呀。

IPv9

今天看到新语丝上面有人提到IPv9,于是去查了一下一些英文的评论,基本上除了国内的新闻(没有真正技术的东西),国外的评论都是负面。
wikipedia的IPv9的英文篇也被标上了“即将删除”的标志,原因是观点不中立,加上英文又差。
我看了一下它的官方网站,不敢多说,但总的感觉是非技术的东西大于技术,是一些个人和某些政府官员在操作着。从技术上讲,我赞成有人的观点,这个IPv9本质上只是一个新的DNS解释,将10位数的数字域名映射到现在的IPv4和IPv6。另外它号称空间大小是2^256次,而Ipv6的大小是2^128次,只是我想,IPv6已经够大,还要搞成256干什么,如果一定要追求大,干脆整成512不更好,这些都不是IPv9比IPv6好的地方了。
看到包括人民日报等媒体也在宣传这玩意,感觉比较纳闷。有新闻里讲到,现在root server主控在美国,中国搞个IPv9,就成为第二个拥有主控权的国家了。也许吧,形象比较重要!

水污染

北方缺水,南方也缺水,南方主要是水质污染。我知道的老家已经花了很多钱治理河流的污染,可能经济发展到一定程度,都会开始关注污染的问题。污染也是经济发展必须要付出的代价吧。我老家在瓯江到东海的入海处,雨量十分充足。初中前最怀念的就是每每放学放下书包就可以跑到100米外的小河里扑腾,或者潜入水摸河螺,十分的羡慕家就在河边的小伙伴。那时河边很漂亮空气干净还有柳树迎风飘扬。但那时候很穷了。后来大家开始富裕了,然后河水也发臭了,树被吹光了,麻雀也死光了,燕子都不来了,田里青蛙也不叫了,据说吃泥鳅都会中毒的。不过反正每人三分地不到,如果靠田地呆在老家估计也只有靠政府救济,温州人喜欢往外跑作生意,挣了钱就回来盖五六层的高楼,好让村人羡慕。不过奇怪的是河水还是照样的臭。如果哪天说温州也没有水吃了,我也不奇怪。


据说在南方现在治理污染是很挣钱的行当之一。


引用

家乡的水
(1)

前几天给家里打电话,我妈跟我说村子里面打了个180米深的深水井,
村里准备给各户安装自来水,还听说这个工程是政府安排的,为的是
让村民避免饮用被污染的浅层地下水。政府能够为升斗小民的生计操
心,实在是让人感动。感动之余,禁不住多想了一下。