<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Geoinformatics &#187; ArcGIS</title>
	<atom:link href="http://www.geoinformatics.cn/tag/arcgis/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.geoinformatics.cn</link>
	<description>Arts and Sciences move me on ...</description>
	<lastBuildDate>Fri, 13 Jan 2012 10:29:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>What does ArcPy tell us?</title>
		<link>http://www.geoinformatics.cn/2011/01/what-does-arcpy-tell-us/</link>
		<comments>http://www.geoinformatics.cn/2011/01/what-does-arcpy-tell-us/#comments</comments>
		<pubDate>Sun, 16 Jan 2011 17:52:00 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Geography]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=3576</guid>
		<description><![CDATA[If Geography matters, then go and study it.]]></description>
			<content:encoded><![CDATA[<p>If <strong>Geography</strong> matters, then go and study it.</p>
<p><a href="http://www.geoinformatics.cn/wp-content/uploads/2011/01/20110117_arcpy.jpg" rel="shadowbox[sbpost-3576];player=img;" title="arcpy"><img class="alignnone size-full wp-image-3577" title="arcpy" src="http://www.geoinformatics.cn/wp-content/uploads/2011/01/20110117_arcpy.jpg" alt="" width="582" height="256" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2011/01/what-does-arcpy-tell-us/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>利用python解析基于GraphML的的社会网络并用GIS展示</title>
		<link>http://www.geoinformatics.cn/2009/10/%e5%88%a9%e7%94%a8python%e8%a7%a3%e6%9e%90%e5%9f%ba%e4%ba%8egraphml%e7%9a%84%e7%9a%84%e7%a4%be%e4%bc%9a%e7%bd%91%e7%bb%9c%e5%b9%b6%e7%94%a8gis%e5%b1%95%e7%a4%ba/</link>
		<comments>http://www.geoinformatics.cn/2009/10/%e5%88%a9%e7%94%a8python%e8%a7%a3%e6%9e%90%e5%9f%ba%e4%ba%8egraphml%e7%9a%84%e7%9a%84%e7%a4%be%e4%bc%9a%e7%bd%91%e7%bb%9c%e5%b9%b6%e7%94%a8gis%e5%b1%95%e7%a4%ba/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 08:16:49 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[Jquery]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Social Network]]></category>
		<category><![CDATA[uDig]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=1438</guid>
		<description><![CDATA[好长一个标题&#8230; &#8230;但是确实是用python来连接SNA（Social Network Analysis）和GIS(Geographic Information System)。脑子里反复想着自己特长是啥，画地图？那大概是5岁以前的事情，后来几个伙计打趣说我谈恋爱很在行，Seriously，这方面我还确实拿不出手。一直不离不弃的，也许就是自己编程的能耐，当学了“君子不器”后，越来越发觉似乎连编程都不能当会事了，但是话说回来，至少这算是个爱好吧。 需求大抵是这样的，客户用igraph进行社会网络分析，然后生成了xml格式的数据文件，但并没有很好的网络展示平台，manager就来找我，希望通过我们研发的WebGIS系统展示。在我们的WebGIS系统中，矢量数据都是保存在PostgreSQL数据库里，一般来说，都是通过shapefile 生成sql files，然后导入数据库。由于没有shapefile，但是分析graphicML文件发现结构还是很简单的，而且对于社会网络的两个node之间的关系（relationship），从几何的角度讲，两个nodes构成的关系就是一条两点直线（edge）。基于此，我希望通过python对graphML进行分析，然后直接生成sql file，导入到postgreSQL里面，此后就能用uDig就能直接转换成为shapefile，我不清楚新版的ArcGIS 9.3有没有相似的功能，好久不用Arctoolbox了。 原始数据片段： &#60; ?xml version=&#34;1.0&#34; encoding=&#34;UTF-8&#34;?&#62; &#60;graphml xmlns=&#34;http://graphml.graphdrawing.org/xmlns&#34; xmlns:xsi=&#34;http://www.w3.org/2001/XMLSchema-instance&#34; xsi:schemaLocation=&#34;http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd&#34;&#62; &#60;!-- Created by igraph --&#62; &#60;key id=&#34;filestub&#34; for=&#34;graph&#34; attr.name=&#34;filestub&#34; attr.type=&#34;string&#34;/&#62; &#60;key id=&#34;id&#34; for=&#34;node&#34; attr.name=&#34;id&#34; attr.type=&#34;string&#34;/&#62; &#60;key id=&#34;xcoord&#34; for=&#34;node&#34; attr.name=&#34;xcoord&#34; attr.type=&#34;double&#34;/&#62; &#60;key id=&#34;ycoord&#34; for=&#34;node&#34; attr.name=&#34;ycoord&#34; attr.type=&#34;double&#34;/&#62; &#60;key id=&#34;h_loc&#34; for=&#34;edge&#34; attr.name=&#34;h_loc&#34; attr.type=&#34;string&#34;/&#62; &#60;key id=&#34;h_zip&#34; for=&#34;edge&#34; attr.name=&#34;h_zip&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>好长一个标题&#8230; &#8230;但是确实是用python来连接SNA（Social Network Analysis）和GIS(Geographic Information System)。脑子里反复想着自己特长是啥，画地图？那大概是5岁以前的事情，后来几个伙计打趣说我谈恋爱很在行，Seriously，这方面我还确实拿不出手。一直不离不弃的，也许就是自己编程的能耐，当学了“君子不器”后，越来越发觉似乎连编程都不能当会事了，但是话说回来，至少这算是个爱好吧。</p>
<p>需求大抵是这样的，客户用igraph进行社会网络分析，然后生成了xml格式的数据文件，但并没有很好的网络展示平台，manager就来找我，希望通过我们研发的WebGIS系统展示。在我们的WebGIS系统中，矢量数据都是保存在PostgreSQL数据库里，一般来说，都是通过shapefile 生成sql files，然后导入数据库。由于没有shapefile，但是分析graphicML文件发现结构还是很简单的，而且对于社会网络的两个node之间的关系（relationship），从几何的角度讲，两个nodes构成的关系就是一条两点直线（edge）。基于此，我希望通过python对graphML进行分析，然后直接生成sql file，导入到postgreSQL里面，此后就能用uDig就能直接转换成为shapefile，我不清楚新版的ArcGIS 9.3有没有相似的功能，好久不用Arctoolbox了。</p>
<p><span id="more-1438"></span><img class="alignnone size-full wp-image-1440" title="sna" src="/wp-content/uploads//200091031_sna1.jpg" alt="sna" width="500" height="466" /></p>
<p>原始数据片段：</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;">&lt; ?xml <span style="color: #000066;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> <span style="color: #000066;">encoding</span>=<span style="color: #ff0000;">&quot;UTF-8&quot;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;graphml</span> <span style="color: #000066;">xmlns</span>=<span style="color: #ff0000;">&quot;http://graphml.graphdrawing.org/xmlns&quot;</span></span>
<span style="color: #009900;">         <span style="color: #000066;">xmlns:xsi</span>=<span style="color: #ff0000;">&quot;http://www.w3.org/2001/XMLSchema-instance&quot;</span></span>
<span style="color: #009900;">         <span style="color: #000066;">xsi:schemaLocation</span>=<span style="color: #ff0000;">&quot;http://graphml.graphdrawing.org/xmlns</span>
<span style="color: #009900;">         http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
<span style="color: #808080; font-style: italic;">&lt;!-- Created by igraph --&gt;</span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;filestub&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;graph&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;filestub&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;id&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;node&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;id&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;xcoord&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;node&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;xcoord&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;double&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;ycoord&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;node&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;ycoord&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;double&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;h_loc&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;h_loc&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;h_zip&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;h_zip&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;h_city&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;h_city&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;t_loc&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;t_loc&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;t_zip&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;t_zip&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;t_city&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;t_city&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;appyear&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;appyear&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;patent&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;patent&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;key</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;pat_type&quot;</span> <span style="color: #000066;">for</span>=<span style="color: #ff0000;">&quot;edge&quot;</span> <span style="color: #000066;">attr.name</span>=<span style="color: #ff0000;">&quot;pat_type&quot;</span> <span style="color: #000066;">attr.type</span>=<span style="color: #ff0000;">&quot;string&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;graph</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;G&quot;</span> <span style="color: #000066;">edgedefault</span>=<span style="color: #ff0000;">&quot;undirected&quot;</span> <span style="color: #000066;">parse.nodes</span>=<span style="color: #ff0000;">&quot;1022&quot;</span> <span style="color: #000066;">parse.edges</span>=<span style="color: #ff0000;">&quot;9399&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;filestub&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>/tmp/VDC/DSB/iGraph.322801<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;node</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;n0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>20190035<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;xcoord&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>394.439<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;ycoord&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>245.759<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/node<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;node</span> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">&quot;n1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;id&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>21810055<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;xcoord&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>452.308<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;ycoord&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>-49.6771<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/node<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;edge</span> <span style="color: #000066;">source</span>=<span style="color: #ff0000;">&quot;n1020&quot;</span> <span style="color: #000066;">target</span>=<span style="color: #ff0000;">&quot;n1021&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;h_loc&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>MA<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;h_zip&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>01532<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;h_city&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>NORTHBORO<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;t_loc&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>MA<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;t_zip&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>01601<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;t_city&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>WORCESTER<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;appyear&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>2004<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;patent&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>7459547<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
      <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;data</span> <span style="color: #000066;">key</span>=<span style="color: #ff0000;">&quot;pat_type&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>U<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/data<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
    <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/edge<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
  <span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/graph<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/graphml<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></div></div>

<p>通过python对XML进行解析，我还是向大家推荐pyQuery，大概是喜欢Jquery的缘故吧，我觉得pyQuery用起来很方便，很顺手。大家可以到pyquery.org查找帮助和教程。需要注意的是，pyQuery对于命名空间的解析似乎不是很好，我记得以前我写过一篇帖子叫做<a href="/?p=1060">两个GIS编程技巧</a>，里面提及了用@nodeName=namespace:elementName的方式来对异域命名空间的元素进行解析。但是pyQuery似乎不能进行该操作，所以我在进行解释之前，将根节点的所有命名空间都删除了。<br />
解析本省是一件很简单的事情，随后写入到另一个文件中，其次对每一个node和edge进行分析，按照SQL语法，生成INSERT INTO的语句。</p>
<p>python 代码片段</p>

<div class="wp_syntax"><div class="code"><pre class="python" style="font-family:monospace;"><span style="color: #ff7700;font-weight:bold;">from</span> pyquery <span style="color: #ff7700;font-weight:bold;">import</span> PyQuery <span style="color: #ff7700;font-weight:bold;">as</span> pq
<span style="color: #ff7700;font-weight:bold;">from</span> lxml <span style="color: #ff7700;font-weight:bold;">import</span> etree
d = pq<span style="color: black;">&#40;</span>filename=<span style="color: #483d8b;">&quot;data/rna.xml&quot;</span><span style="color: black;">&#41;</span>
<span style="color: #008000;">file</span> = <span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: #483d8b;">'data/output.sql'</span>, <span style="color: #483d8b;">'w+'</span><span style="color: black;">&#41;</span>
content = <span style="color: #483d8b;">''</span>
nodes =  d<span style="color: black;">&#40;</span><span style="color: #483d8b;">'node'</span><span style="color: black;">&#41;</span>
<span style="color: #ff7700;font-weight:bold;">for</span> item <span style="color: #ff7700;font-weight:bold;">in</span> nodes:
  content += <span style="color: #483d8b;">&quot;INSERT INTO sn_node ( the_geom, nid) VALUES ( GeomFromText('POINT(&quot;</span> + item<span style="color: black;">&#91;</span><span style="color: #ff4500;">1</span><span style="color: black;">&#93;</span>.<span style="color: black;">text</span>.<span style="color: #0000cd;">__str__</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> + <span style="color: #483d8b;">&quot; &quot;</span> + item<span style="color: black;">&#91;</span><span style="color: #ff4500;">2</span><span style="color: black;">&#93;</span>.<span style="color: black;">text</span>.<span style="color: #0000cd;">__str__</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span> +<span style="color: #483d8b;">&quot;)', 900913), '&quot;</span> + item.<span style="color: black;">attrib</span><span style="color: black;">&#91;</span><span style="color: #483d8b;">'id'</span><span style="color: black;">&#93;</span> + <span style="color: #483d8b;">&quot;');<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>
<span style="color: #008000;">file</span>.<span style="color: black;">write</span><span style="color: black;">&#40;</span>content<span style="color: black;">&#41;</span>
<span style="color: #008000;">file</span>.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></pre></div></div>

<p>从而生成output.sql,如下片段，</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_node <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> nid<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'POINT(394.439 245.759)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n0'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_node <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> nid<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'POINT(452.308 -49.6771)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n1'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_node <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> nid<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'POINT(172.295 72.8809)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n2'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_node <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> nid<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'POINT(-217.813 -581.18)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n3'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_edge <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> snid<span style="color: #66cc66;">,</span> tnid<span style="color: #66cc66;">,</span> s_zip<span style="color: #66cc66;">,</span> t_zip<span style="color: #66cc66;">,</span> appyear<span style="color: #66cc66;">,</span> patent<span style="color: #66cc66;">,</span> pat_type<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'LINESTRING(-206.829 790.104,-200.639 791.055)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n121'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n365'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'05403'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'05452'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'1997'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'5902044'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'U'</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">INSERT</span> <span style="color: #993333; font-weight: bold;">INTO</span> sn_edge <span style="color: #66cc66;">&#40;</span> the_geom<span style="color: #66cc66;">,</span> snid<span style="color: #66cc66;">,</span> tnid<span style="color: #66cc66;">,</span> s_zip<span style="color: #66cc66;">,</span> t_zip<span style="color: #66cc66;">,</span> appyear<span style="color: #66cc66;">,</span> patent<span style="color: #66cc66;">,</span> pat_type<span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">VALUES</span> <span style="color: #66cc66;">&#40;</span> GeomFromText<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'LINESTRING(-206.829 790.104,-231.181 757.468)'</span><span style="color: #66cc66;">,</span> <span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n121'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'n214'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'05403'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'05403'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'1998'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'6134704'</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'U'</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>生成了SQL的INSERT INTO 语句后，然后加上创建数据库和构建索引的语句</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> sn_node <span style="color: #66cc66;">&#40;</span>
id serial<span style="color: #66cc66;">,</span>
nid <span style="color: #993333; font-weight: bold;">VARCHAR</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">SELECT</span> AddGeometryColumn<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">''</span><span style="color: #66cc66;">,</span> <span style="color: #ff0000;">'sn_node'</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'the_geom'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">900913</span><span style="color: #66cc66;">,</span><span style="color: #ff0000;">'POINT'</span><span style="color: #66cc66;">,</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">INDEX</span> sn_node_index <span style="color: #993333; font-weight: bold;">ON</span> sn_node <span style="color: #993333; font-weight: bold;">USING</span> GIST <span style="color: #66cc66;">&#40;</span> the_geom <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>所有的SQL语句组成了一个SQL文件，如果你有PgAdminIII，导入不是繁琐的事情。不再熬述了。uDig可以直接读取PostgreSQL里面的数据，然后我在uDig里面可以绘制出社会网络的模型，也可uDig输出shapefile，再用ArcGIS读取并展示。如图所示：</p>
<p><img class="alignnone size-full wp-image-1441" title="ArcGIS 显示 SNA" src="/wp-content/uploads//200091031_sna2.jpg" alt="ArcGIS 显示 SNA" width="500" height="478" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/10/%e5%88%a9%e7%94%a8python%e8%a7%a3%e6%9e%90%e5%9f%ba%e4%ba%8egraphml%e7%9a%84%e7%9a%84%e7%a4%be%e4%bc%9a%e7%bd%91%e7%bb%9c%e5%b9%b6%e7%94%a8gis%e5%b1%95%e7%a4%ba/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>I definitely love this GeoTweeters stuff.</title>
		<link>http://www.geoinformatics.cn/2009/10/i-definitely-love-this-geotweeters-stuff/</link>
		<comments>http://www.geoinformatics.cn/2009/10/i-definitely-love-this-geotweeters-stuff/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 21:10:47 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=1294</guid>
		<description><![CDATA[This application was demonstrated as part of the GIS and Web 2.0 Application Development Demo Theater for the ESRI UC 2009.The sample illustrates how to:1. Integrate the ArcGIS Silverlight API with Twitter2. Geocode your friends with Bing asynchronously3. Use control templates and animation in XAML4. Construct point and line graphics 5. Consume WCF services]]></description>
			<content:encoded><![CDATA[<p><a href="http://resources.esri.com/arcgisserver/apis/silverlight/index.cfm?fa=codeGalleryDetails&amp;scriptId=16467" title="20091008_geotweeter"><img class="alignnone size-full wp-image-1296" title="20091008_geotweeter" src="/wp-content/uploads//20091008_geotweeter.jpg" alt="20091008_geotweeter" width="500" height="246" /></a></p>
<p>This application was demonstrated as part of the <strong>GIS and Web 2.0 Application Development Demo Theater</strong> for the ESRI UC 2009.<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />The sample illustrates how to:<br style="padding: 0px; margin: 0px;" /><br style="padding: 0px; margin: 0px;" />1. Integrate the ArcGIS Silverlight API with Twitter<br style="padding: 0px; margin: 0px;" />2. Geocode your friends with Bing asynchronously<br style="padding: 0px; margin: 0px;" />3. Use control templates and animation in XAML<br style="padding: 0px; margin: 0px;" />4. Construct point and line graphics <br style="padding: 0px; margin: 0px;" />5. Consume WCF services</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/10/i-definitely-love-this-geotweeters-stuff/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>输了，但一点也不难受。</title>
		<link>http://www.geoinformatics.cn/2009/03/%e8%be%93%e4%ba%86%ef%bc%8c%e4%bd%86%e4%b8%80%e7%82%b9%e4%b9%9f%e4%b8%8d%e9%9a%be%e5%8f%97/</link>
		<comments>http://www.geoinformatics.cn/2009/03/%e8%be%93%e4%ba%86%ef%bc%8c%e4%bd%86%e4%b8%80%e7%82%b9%e4%b9%9f%e4%b8%8d%e9%9a%be%e5%8f%97/#comments</comments>
		<pubDate>Fri, 27 Mar 2009 01:23:06 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Ext]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Mapfish]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=954</guid>
		<description><![CDATA[下午从best buy回来，给ESRI公司的David Martinez写信询问了今年ESRI Mashup Challenge的结果。很不幸，我没有入选，首先恭喜入选的两位选手Alper Dincer and Matthew Petre（团队）。 中国古代就有吃不到葡萄就说葡萄酸的传统，但是我并不是想说葡萄酸，只是想公正的思考一下为什么这两个人能够获得胜利。Alper做的是将ArcGIS JS API 和EXT结合的构架。说句实话，我真的不觉得这个应用有什么创新，这种概念在2006年时就有了geoEXT，更不说现在的Mapfish。同时，在我所做的应用中，是很少用地图JS API 和EXT进行结合使用的，把这个两个都疯狂耗费客户端内存的东西放在一起使用，是一般用户所难以接受的，虽然界面美观，但是从另一个角度说，你的界面也很单一。在编程方面，我不是个爱慕虚荣的人，所以我不会为了UI而消耗大量的内存。 其次，第二个来自Matthew Petre的，足足四个人的团队，，为什么做出的东西就像是在用simple viewer team的东西呀。。而且，功能很简单，我真的后悔没有把我去年当internet GIS助教时给学生们做的实例拿出来当参赛作品。 也许这就是ESRI的风格，昨天我忍不住骂了ESRI的ArcGIS，今天又不得不颇感无奈，也许自己钟情的开源和ESRI本来就是两条路，想要ESRI支持开源，给你点financial support，估计是相当impossible的stuff。 anyway,最后David Martinez告诉我，说他们明年也要开发heatmap，简直是心头再砍一刀，是自己的思路太超前了？？还是我抢走了ESRI 工程师的饭碗，做了他们应该做的事情？ 呵呵， 就当这次是和ESRI交了一次手，大哥，俺领教您了。下次，俺会长个心眼。 最后还是要感谢这次帮助我的兄弟姐妹们，每每我在QQ或者MSN上倡议帮俺投票，兄弟们总是义无反顾，以后在道上混，还需要大家多多照顾：）]]></description>
			<content:encoded><![CDATA[<p>下午从best buy回来，给ESRI公司的David Martinez写信询问了今年ESRI Mashup Challenge的结果。很不幸，我没有入选，首先恭喜入选的两位选手Alper Dincer and Matthew Petre（团队）。</p>
<p>中国古代就有吃不到葡萄就说葡萄酸的传统，但是我并不是想说葡萄酸，只是想公正的思考一下为什么这两个人能够获得胜利。Alper做的是将ArcGIS JS API 和EXT结合的构架。说句实话，我真的不觉得这个应用有什么创新，这种概念在2006年时就有了geoEXT，更不说现在的Mapfish。同时，在我所做的应用中，是很少用地图JS API 和EXT进行结合使用的，把这个两个都疯狂耗费客户端内存的东西放在一起使用，是一般用户所难以接受的，虽然界面美观，但是从另一个角度说，你的界面也很单一。在编程方面，我不是个爱慕虚荣的人，所以我不会为了UI而消耗大量的内存。</p>
<p>其次，第二个来自Matthew Petre的，足足四个人的团队，，为什么做出的东西就像是在用simple viewer team的东西呀。。而且，功能很简单，我真的后悔没有把我去年当internet GIS助教时给学生们做的实例拿出来当参赛作品。</p>
<p>也许这就是ESRI的风格，昨天我忍不住骂了ESRI的ArcGIS，今天又不得不颇感无奈，也许自己钟情的开源和ESRI本来就是两条路，想要ESRI支持开源，给你点financial support，估计是相当impossible的stuff。</p>
<p>anyway,最后David Martinez告诉我，说他们明年也要开发heatmap，简直是心头再砍一刀，是自己的思路太超前了？？还是我抢走了ESRI 工程师的饭碗，做了他们应该做的事情？ 呵呵， 就当这次是和ESRI交了一次手，大哥，俺领教您了。下次，俺会长个心眼。</p>
<p>最后还是要感谢这次帮助我的兄弟姐妹们，每每我在QQ或者MSN上倡议帮俺投票，兄弟们总是义无反顾，以后在道上混，还需要大家多多照顾：）</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/03/%e8%be%93%e4%ba%86%ef%bc%8c%e4%bd%86%e4%b8%80%e7%82%b9%e4%b9%9f%e4%b8%8d%e9%9a%be%e5%8f%97/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>我本将心向明月,奈何明月照沟渠</title>
		<link>http://www.geoinformatics.cn/2009/03/%e6%88%91%e6%9c%ac%e5%b0%86%e5%bf%83%e5%90%91%e6%98%8e%e6%9c%88%e5%a5%88%e4%bd%95%e6%98%8e%e6%9c%88%e7%85%a7%e6%b2%9f%e6%b8%a0/</link>
		<comments>http://www.geoinformatics.cn/2009/03/%e6%88%91%e6%9c%ac%e5%b0%86%e5%bf%83%e5%90%91%e6%98%8e%e6%9c%88%e5%a5%88%e4%bd%95%e6%98%8e%e6%9c%88%e7%85%a7%e6%b2%9f%e6%b8%a0/#comments</comments>
		<pubDate>Thu, 26 Mar 2009 02:51:01 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Django]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=952</guid>
		<description><![CDATA[本想在ESRI Mashup Code Challenge结果公布之前积点口德，但是确实忍不住了。最近用了两个相当stupid的软件，一个叫做CUBE，另一个叫做ArcGIS。这两个软件都ArcGIS有关，stupid程度让人乍舌。 今天很想用geoprocessing做点事情，毕竟illir老师希望我们基于ArcGIS做点相应的开发，加之自己以前做spatial analyst还算颇有经验。谁知arcgisscripting的 version hell真的让人崩溃，俺总不能为了满足arcgis的需要删除shapely，numpy，scipy以及python for GDAL吧。。 一句长叹，我本将心向明月，奈何明月照沟渠。]]></description>
			<content:encoded><![CDATA[<p>本想在ESRI Mashup Code Challenge结果公布之前积点口德，但是确实忍不住了。最近用了两个相当stupid的软件，一个叫做CUBE，另一个叫做ArcGIS。这两个软件都ArcGIS有关，stupid程度让人乍舌。</p>
<p>今天很想用geoprocessing做点事情，毕竟illir老师希望我们基于ArcGIS做点相应的开发，加之自己以前做spatial analyst还算颇有经验。谁知arcgisscripting的 version hell真的让人崩溃，俺总不能为了满足arcgis的需要删除shapely，numpy，scipy以及python for GDAL吧。。</p>
<p>一句长叹，我本将心向明月，奈何明月照沟渠。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/03/%e6%88%91%e6%9c%ac%e5%b0%86%e5%bf%83%e5%90%91%e6%98%8e%e6%9c%88%e5%a5%88%e4%bd%95%e6%98%8e%e6%9c%88%e7%85%a7%e6%b2%9f%e6%b8%a0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>请投我一票！! Vote for me！！</title>
		<link>http://www.geoinformatics.cn/2009/03/%e8%af%b7%e7%bb%99%e6%88%91%e6%8a%95%e4%b8%80%e7%a5%a8%ef%bc%81-vote-for-me%ef%bc%81%ef%bc%81/</link>
		<comments>http://www.geoinformatics.cn/2009/03/%e8%af%b7%e7%bb%99%e6%88%91%e6%8a%95%e4%b8%80%e7%a5%a8%ef%bc%81-vote-for-me%ef%bc%81%ef%bc%81/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 13:25:41 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Dreams]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=939</guid>
		<description><![CDATA[大家好，赵博参加ESRI Mashup 开发大赛，希望得到大家的支持！请大家为我投票，投票网站是http://surveys2.esri.com/mashup, 我的参赛作品是HeatMap Plugin for ArcGIS Flex API, Flex, Bo Zhao。可能要填写较为真实的个人联系信息，大家多多帮忙！！先谢过了. Hi Guys！ I participate in the 2009 ArcGIS Server Mashup Code Challenge, I need your help to vote for my mashup work at http://surveys2.esri.com/mashup, my work&#8217;s title is HeatMap Plugin for ArcGIS Flex API, Flex, Bo Zhao!!! Thank you very much!]]></description>
			<content:encoded><![CDATA[<p>大家好，赵博参加ESRI Mashup 开发大赛，希望得到大家的支持！请大家为我投票，投票网站是<a href="http://surveys2.esri.com/mashup" target="_blank">http://surveys2.esri.com/mashup</a>, 我的参赛作品是<a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=16048" target="_blank">HeatMap Plugin for ArcGIS Flex API, Flex, Bo Zhao</a>。可能要填写较为真实的个人联系信息，大家多多帮忙！！先谢过了.</p>
<p>Hi Guys！ I participate in the 2009 ArcGIS Server Mashup Code Challenge, I need your help to vote for my mashup work at <a href="http://surveys2.esri.com/mashup">http://surveys2.esri.com/mashup</a>, my work&#8217;s title is <a href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=16048" target="_blank">HeatMap Plugin for ArcGIS Flex API, Flex, Bo Zhao!!! </a> Thank you very much!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/03/%e8%af%b7%e7%bb%99%e6%88%91%e6%8a%95%e4%b8%80%e7%a5%a8%ef%bc%81-vote-for-me%ef%bc%81%ef%bc%81/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>HeatMap Plugin for ArcGIS Flex API</title>
		<link>http://www.geoinformatics.cn/2009/02/heatmap-plugin-for-arcgis-flex-api/</link>
		<comments>http://www.geoinformatics.cn/2009/02/heatmap-plugin-for-arcgis-flex-api/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 04:51:21 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Heat Map]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=926</guid>
		<description><![CDATA[I&#8217;ve just written this plugin, the current version of which is 0.5.0. In terms of the usage, this plugin is used to create heatmaps on to ArcGIS Flex Map. There are also a couple of examples to guide you to learn how to use this plugin. Heatmap is very useful to analysis and visualize the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just written this plugin, the current version of which is 0.5.0. In terms of the usage, this plugin is used to create heatmaps on to ArcGIS Flex Map. There are also a couple of examples to guide you to learn how to use this plugin. Heatmap is very useful to analysis and visualize the trends of a group of markers in 2D surface. There is rarely examples on how to make a heatmap for a web application. ArcGIS Flex API just provides us a good tool to create heatmap. Here are two lively examples:</p>
<ol>
<li>/lab/heatmap/wifi.html</li>
<li>/lab/heatmap/live_earthquakes.html.</li>
</ol>
<p style="text-align: center;"><a href="/wp-content/uploads//20090223_wifi.jpg" rel="shadowbox[sbpost-926];player=img;" title="20090223_wifi"><img class="size-medium wp-image-927 aligncenter" title="20090223_wifi" src="/wp-content/uploads//20090223_wifi-300x221.jpg" alt="" width="300" height="221" /></a></p>
<p style="text-align: left;">And you can download this plugin at http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;scriptID=16048 .</p>
<p style="text-align: left;"><strong>PS: </strong>Hope you could support my heatmap plugin. And just vote for me if you think this  plugin is useful. And Now I am trying to convert it to meet Umap.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/02/heatmap-plugin-for-arcgis-flex-api/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Making heatmap for Arcgis Flex API</title>
		<link>http://www.geoinformatics.cn/2009/02/making-heatmap-for-arcgis-flex-api/</link>
		<comments>http://www.geoinformatics.cn/2009/02/making-heatmap-for-arcgis-flex-api/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 01:53:54 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[Heat Map]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/?p=920</guid>
		<description><![CDATA[Sorry for not updating my blog recently, Recently I mainly focused on making HeatMap. I have succeesfully made some heatmap by  Arcgis Flex API and Google Flex map API. for instance, I use the live earthquake georss data to make the following map, datasource: feed://earthquake.usgs.gov/eqcenter/catalogs/7day-M2.5.xml I decided to make a plugin for ArcGIS Flex API [...]]]></description>
			<content:encoded><![CDATA[<p>Sorry for not updating my blog recently, Recently I mainly focused on making HeatMap. I have succeesfully made some heatmap by  Arcgis Flex API and Google Flex map API. for instance, I use the live earthquake georss data to make the following map,</p>
<p><a href="/wp-content/uploads//20090215_heatmap.jpg" rel="shadowbox[sbpost-920];player=img;" title="heatmap for lively earthquakes"><img class="alignnone size-full wp-image-921" title="heatmap for lively earthquakes" src="/wp-content/uploads//20090215_heatmap.jpg" alt="" width="480" height="368" /></a></p>
<p>datasource: feed://earthquake.usgs.gov/eqcenter/catalogs/7day-M2.5.xml</p>
<p>I decided to make a plugin for ArcGIS Flex API first to make heatmaps. It might cost me couple of days, however, it will faciliate to make heatmaps then.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2009/02/making-heatmap-for-arcgis-flex-api/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>uDig ain&#8217;t ArcGIS quite yet.</title>
		<link>http://www.geoinformatics.cn/2006/11/udig-aint-arcgis-quite-yet/</link>
		<comments>http://www.geoinformatics.cn/2006/11/udig-aint-arcgis-quite-yet/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 03:25:56 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[OpenGIS]]></category>
		<category><![CDATA[uDig]]></category>
		<category><![CDATA[开源]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/index.php/category/opensource/20061113333.html</guid>
		<description><![CDATA[I picked the sentence “uDig ain&#8217;t ArcGIS quite yet.”from Paul Ramsey&#8217;s blog. A certain user picked up udig to conclude that his shop would not move to the opensource  enviornment in the near future. Paul said that If you want people to switch you need to make the transition as painless as possible. Firefox got [...]]]></description>
			<content:encoded><![CDATA[<p>I picked the sentence “uDig ain&#8217;t ArcGIS quite yet.”from Paul Ramsey&#8217;s blog. A certain user picked up udig to conclude that his shop would not move to the opensource  enviornment in the near future.</p>
<p>Paul said that If you want people to switch you need to make the transition as painless as possible. Firefox got people to switch to IE by</p>
<ul>
<li>*Making better software</li>
<li>*Not making user learn a new UI for interacting with the web</li>
<li>*importing all their IE favorites</li>
<li>*THEN building in cool new features that keep people around</li>
</ul>
<p>So, uDig Team have to do is make something better than ArcGIS, but not so much better that it is not familiar to the existing user base, that works transparently with all their existing data and presumably their .mxd files too. And meanwhile give it away for free.</p>
<p>Paul said,<strong> Open source is not about users</strong>, it is about developers. It is only about users in so far as users become sufficiently engaged in the project that they either become developers themselves, or support developers through careful bug finding or documentation.</p>
<p>At last, Paul describe the correct models by his point of view. He said that the FireFox or Open Office are incorrect modles, because they are something a litte aberrate. Paul said the correct models are Linux, Apache, Perl, PostgreSQL，not user-friendly, but still very useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2006/11/udig-aint-arcgis-quite-yet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>影像金子塔</title>
		<link>http://www.geoinformatics.cn/2006/10/%e5%bd%b1%e5%83%8f%e9%87%91%e5%ad%90%e5%a1%94/</link>
		<comments>http://www.geoinformatics.cn/2006/10/%e5%bd%b1%e5%83%8f%e9%87%91%e5%ad%90%e5%a1%94/#comments</comments>
		<pubDate>Fri, 20 Oct 2006 16:21:23 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[遥感]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/index.php/category/rs/20061020278.html</guid>
		<description><![CDATA[我们每次用ArcGIS打开一幅影像的时候，都会在状态栏中看到Creating pyramids,这时就是在构建影像的金子塔。现在的google map，visual earth，mapbar这些portal应用都采用的是把地图预先处理成影象金字塔，切块后做四叉树编码。在进行zoom，pan操作的时候动态调用那些maptile。这种架构省略掉了制图引擎这些对服务器性能消耗大的环节，但受到一定的限制，例如很难做到图层控制。 如果影像文件没有金字塔或者金字塔文件无法访问，ArcReader并不能自己创建金字塔。在ArcGIS中，金字塔文件对于影像的绘制性能非常重要。通常，在ArcMap的作者使用栅格时会创建金字塔文件，该文件被放到与栅格文件同一个文件夹。如果ArcMap的作者没有对栅格文件所在文件夹的写权限，金字塔文件就会创建到该作者的临时文件夹下。那么如果在其它电脑上的ArcRead的用户打开一个带栅格的PMF文件，就无法访问到金字塔文件了。没有金字塔文件，绘画的性能就很差，质量也不理想。出现这种情况时，可以将栅格的金字塔复制到本地的temprasterproxies文件夹，但是最好还是将金字塔和栅格文件一起放在一个单独的源文件夹下。]]></description>
			<content:encoded><![CDATA[<p>我们每次用ArcGIS打开一幅影像的时候，都会在状态栏中看到Creating pyramids,这时就是在构建影像的金子塔。现在的google map，visual earth，mapbar这些portal应用都采用的是把地图预先处理成影象金字塔，切块后做四叉树编码。在进行zoom，pan操作的时候动态调用那些maptile。这种架构省略掉了制图引擎这些对服务器性能消耗大的环节，但受到一定的限制，例如很难做到图层控制。</p>
<p>如果影像文件没有金字塔或者金字塔文件无法访问，ArcReader并不能自己创建金字塔。在ArcGIS中，金字塔文件对于影像的绘制性能非常重要。通常，在ArcMap的作者使用栅格时会创建金字塔文件，该文件被放到与栅格文件同一个文件夹。如果ArcMap的作者没有对栅格文件所在文件夹的写权限，金字塔文件就会创建到该作者的临时文件夹下。那么如果在其它电脑上的ArcRead的用户打开一个带栅格的PMF文件，就无法访问到金字塔文件了。没有金字塔文件，绘画的性能就很差，质量也不理想。出现这种情况时，可以将栅格的金字塔复制到本地的temprasterproxies文件夹，但是最好还是将金字塔和栅格文件一起放在一个单独的源文件夹下。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2006/10/%e5%bd%b1%e5%83%8f%e9%87%91%e5%ad%90%e5%a1%94/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>让DEM数据更有表现力</title>
		<link>http://www.geoinformatics.cn/2006/10/%e8%ae%a9dem%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%9c%89%e8%a1%a8%e7%8e%b0%e5%8a%9b/</link>
		<comments>http://www.geoinformatics.cn/2006/10/%e8%ae%a9dem%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%9c%89%e8%a1%a8%e7%8e%b0%e5%8a%9b/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 02:49:34 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[DEM]]></category>
		<category><![CDATA[GIS]]></category>
		<category><![CDATA[Map]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/index.php/category/gis/20061011256.html</guid>
		<description><![CDATA[前一段时间一直在做地图，再如何让DEM数据更有表现力方面也有自己的一些体会，呵呵，和大家一起分享。下面的左图是一份普通的DEM数据，为了使成图的时候更有表现力，我们经常会用一个过渡的色系来表示，但是这样还是体会不到高度的变化，如下面的右图所示：  这时，我们用ArcGIS的hillshade命令，将DEM数据处理成hillshade图。选择一定的太阳高度角和方向角。如下面的左图。这样，把hillshade层放到用过渡色表示的DEM数据的下面，然后再给他赋一个透明度。赋透明度的目的是为了将将DEM和hillshade进行叠加。经过试验，透明度为30%，效果比较好。如下右图所示。 呵呵，看到了吧，效果还是不错滴。其实大家会说Musicman不关心技术，只关心新闻，其实musicman每天都要看很多资料，每当夜深人静的时候，一人在床前，盯着自己的X40，就有说不尽的话，哎，真的很想出国，有时候发现自己留在国内是个错误，但是留下了就努力取干吧，与其在蛮怨中生活，还不如自己坚持取努力，让自己变得更加强悍。]]></description>
			<content:encoded><![CDATA[<p>前一段时间一直在做地图，再如何让DEM数据更有表现力方面也有自己的一些体会，呵呵，和大家一起分享。下面的左图是一份普通的DEM数据，为了使成图的时候更有表现力，我们经常会用一个过渡的色系来表示，但是这样还是体会不到高度的变化，如下面的右图所示：</p>
<p><img src="/wp-content/uploads/200610101.jpg" /></p>
<p> 这时，我们用ArcGIS的hillshade命令，将DEM数据处理成hillshade图。选择一定的太阳高度角和方向角。如下面的左图。这样，把hillshade层放到用过渡色表示的DEM数据的下面，然后再给他赋一个透明度。赋透明度的目的是为了将将DEM和hillshade进行叠加。经过试验，透明度为30%，效果比较好。如下右图所示。</p>
<p><img src="/wp-content/uploads/200610102.jpg" /></p>
<p>呵呵，看到了吧，效果还是不错滴。其实大家会说Musicman不关心技术，只关心新闻，其实musicman每天都要看很多资料，每当夜深人静的时候，一人在床前，盯着自己的X40，就有说不尽的话，哎，真的很想出国，有时候发现自己留在国内是个错误，但是留下了就努力取干吧，与其在蛮怨中生活，还不如自己坚持取努力，让自己变得更加强悍。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2006/10/%e8%ae%a9dem%e6%95%b0%e6%8d%ae%e6%9b%b4%e6%9c%89%e8%a1%a8%e7%8e%b0%e5%8a%9b/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>ArcGIS works with Illustrator</title>
		<link>http://www.geoinformatics.cn/2006/09/arcgis-work-with-illustrator/</link>
		<comments>http://www.geoinformatics.cn/2006/09/arcgis-work-with-illustrator/#comments</comments>
		<pubDate>Thu, 07 Sep 2006 15:10:52 +0000</pubDate>
		<dc:creator>长安旧梦</dc:creator>
				<category><![CDATA[技术心得]]></category>
		<category><![CDATA[ArcGIS]]></category>
		<category><![CDATA[Illustrator]]></category>
		<category><![CDATA[Map]]></category>
		<category><![CDATA[SVG]]></category>

		<guid isPermaLink="false">http://www.geoinformatics.cn/index.php/category/carto/20060907191.html</guid>
		<description><![CDATA[记得前一段时间给南京做产业用地布局的时候，我们作图基本上是用arcGIS做好地理地图，然后将底图输出成jpg的格式，导入到illustrator中去。然后在illustrator中进行产业发展轴之类的布局。 最近在做昆明的项目，仔细看了一下arcGIS中export map的设置，可以输出诸如*.svg, *.ai之类的格式，这样的话，可以直接在illustrator中处理矢量地图，较为方便。用illustrator作图，比用arcGIS要美观很多，同时，较之photoshop在矢量处理中也有很多优势。所以以后难做的图就尽量不用“ps一下”，而更多地会是“it一下”。]]></description>
			<content:encoded><![CDATA[<p>记得前一段时间给南京做产业用地布局的时候，我们作图基本上是用arcGIS做好地理地图，然后将底图输出成jpg的格式，导入到illustrator中去。然后在illustrator中进行产业发展轴之类的布局。 最近在做昆明的项目，仔细看了一下arcGIS中export map的设置，可以输出诸如*.svg, *.ai之类的格式，这样的话，可以直接在illustrator中处理矢量地图，较为方便。用illustrator作图，比用arcGIS要美观很多，同时，较之photoshop在矢量处理中也有很多优势。所以以后难做的图就尽量不用“ps一下”，而更多地会是“it一下”。</p>
]]></content:encoded>
			<wfw:commentRss>http://www.geoinformatics.cn/2006/09/arcgis-work-with-illustrator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

