kuanghu16
路人甲
路人甲
  • 注册日期2004-03-18
  • 发帖数73
  • QQ
  • 铜币227枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:1296回复:0

量数据在RDBMS中存储 疑问

楼主#
更多 发布于:2004-09-14 14:54
<P ><FONT size=3>我现在问一个关于<FONT face="Times New Roman"> “</FONT>矢量数据在<FONT face="Times New Roman">RDBMS</FONT>中存储的问题<FONT face="Times New Roman">”,</FONT>我找到下面两中说法,觉得有点矛盾!<FONT face="Times New Roman"> </FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3>第一说法:<p></p></FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">arcsde</FONT>中进行矢量存储的时候<FONT face="Times New Roman"> </FONT>,以要素表和业务表进行存储<FONT face="Times New Roman"> </FONT>,并且以<FONT face="Times New Roman">FID</FONT>进行连接:<p></p></FONT></P>
<P ><FONT size=3>描述如下:</FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">ArcSDE</FONT>中的空间数据组织<p></p></FONT></P>
<P ><FONT size=3>空间数据包括坐标数据和属性数据两大部分。通常属性数据在关系数据库的存储中非常方便。但是对于坐标数据就比较麻烦,这是因为一个空间目标的坐标数据不定长,往往包括很多个坐标对,在关系数据库中不能使用一个字段来记录这些坐标值。</FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">ArcSDE</FONT>分别采用两张表来存储属性数据和坐标数据。其中一张是业务表,用来存储属性数据,另一张是要素表(即几何坐标表),用来存储坐标数据,要素表包括<FONT face="Times New Roman">14</FONT>个字段:<FONT face="Times New Roman">fid</FONT>、<FONT face="Times New Roman">Numofpts</FONT>、<FONT face="Times New Roman">Entity</FONT>、<FONT face="Times New Roman">Eminx</FONT>、<FONT face="Times New Roman">Eminy</FONT>、<FONT face="Times New Roman">Emaxx</FONT>、<FONT face="Times New Roman">Emaxy</FONT>、<FONT face="Times New Roman">Eminz</FONT>、<FONT face="Times New Roman">Emaxz</FONT>、<FONT face="Times New Roman">min_measure</FONT>、<FONT face="Times New Roman">max_measure</FONT>、<FONT face="Times New Roman">Area</FONT>、<FONT face="Times New Roman">Len</FONT>和<FONT face="Times New Roman">points</FONT>。这两张表是相互独立的,必须建立它们之间的联系。<FONT face="Times New Roman">ArcSDE</FONT>是通过一个叫做空间列(<FONT face="Times New Roman">spatial column</FONT>)的字段建立业务表与要素表的联系。</FONT></P>
<P ><FONT size=3>所谓空间列,实际上就是在业务表上添加的一个字段,该字段用于存储空间目标的坐标数据在要素表中所占记录的<FONT face="Times New Roman">ID</FONT>号(<FONT face="Times New Roman">featureID</FONT>或<FONT face="Times New Roman">fid</FONT>)(注意,这里说是空间列仅仅是存储<FONT face="Times New Roman">id,</FONT>并不存储数据)。通过空间列,用户可以直接由业务表中的记录在要素表内找到对应的空间坐标数据(如图<FONT face="Times New Roman">8.8</FONT>)。</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3><FONT face="Times New Roman">  </FONT>第二说法<p></p></FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">ESRI</FONT>公司的<FONT face="Times New Roman">Spatial Database Engine</FONT>(<FONT face="Times New Roman">SDE</FONT>)、<FONT face="Times New Roman">Mapinfo</FONT>公司<FONT face="Times New Roman">SpatialWare</FONT>、<FONT face="Times New Roman">Intergraph</FONT>公司的<FONT face="Times New Roman">GeoMedia</FONT>。它们都是把空间数据(矢量数据中的几何数据、拓扑数据或栅格数据)以二进制数据块的形式存储在数据库中,而属性数据以常用数据类型的形式存储<FONT face="Times New Roman"> </FONT>,“空间数据以二进制数据块的形式存储在数据库中“,是如何存储呢,是仅仅打包坐标数据放到<FONT face="Times New Roman">shape</FONT>?</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><a href="http://www.esrichina-bj.cn/produce/esri/arcgis/arcgis9/arcgis9_3.7.htm" target="_blank" ><FONT face="Times New Roman" size=3>http://www.esrichina-bj.cn/produce/esri/arcgis/arcgis9/arcgis9_3.7.htm</FONT></A><FONT size=3>)中说</FONT></P>
<P ><FONT size=3>可以利用<FONT face="Times New Roman">DBMS</FONT>中的多种数据类型来存放空间数据,比如<FONT face="Times New Roman">BLOB</FONT>(<FONT face="Times New Roman">binary large object</FONT>),或者一些<FONT face="Times New Roman">DBMS</FONT>扩展的空间类型,比如<FONT face="Times New Roman">Oracle</FONT>空间扩展模块提供的空间数据的存储类型。</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3><FONT face="Times New Roman">Geodatabase</FONT>在<FONT face="Times New Roman">RDBMS</FONT>中的存储<p></p></FONT></P>
<P ><FONT size=3>空间数据一般存储为矢量要素和栅格数据,以及传统意义上属性表。比如:一个<FONT face="Times New Roman">DBMS</FONT>表可以用来存放一个要素的集合,表中的每行可以用来保存一个要素。每行中的<FONT face="Times New Roman">shape</FONT>字段存储要素的空间几何或形状信息<FONT face="Times New Roman">(</FONT>注意:是不是空间坐标数据就是直接存储在<FONT face="Times New Roman">shape</FONT>字段中?这与第一种说法有冲突<FONT face="Times New Roman">)</FONT>,<FONT face="Times New Roman">shape</FONT>字段的类型一般分为两种:</FONT></P>
<P ><FONT face="Times New Roman" size=3>BLOB </FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">DBMS</FONT>支持的空间类型<FONT face="Times New Roman"> </FONT></FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3><FONT face="Times New Roman">  </FONT>也就是说<FONT face="Times New Roman">  </FONT>一张表就存储整个的空间数据,那么每行是一个要素,他的空间信息(坐标)是在<FONT face="Times New Roman">shape</FONT>字段存储,好象没有业务表和要素表之分。</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3>而第一种说法是<FONT face="Times New Roman"> </FONT>空间信息(<FONT face="Times New Roman">fid</FONT>、<FONT face="Times New Roman">Numofpts</FONT>、<FONT face="Times New Roman">Entity</FONT>、<FONT face="Times New Roman">Eminx</FONT>、<FONT face="Times New Roman">Eminy</FONT>、<FONT face="Times New Roman">Emaxx</FONT>、<FONT face="Times New Roman">Emaxy</FONT>、<FONT face="Times New Roman">Eminz</FONT>、<FONT face="Times New Roman">Emaxz</FONT>、<FONT face="Times New Roman">min_measure</FONT>、<FONT face="Times New Roman">max_measure</FONT>、<FONT face="Times New Roman">Area</FONT>、<FONT face="Times New Roman">Len</FONT>和<FONT face="Times New Roman">points</FONT>等)是在要素表存储,并不放到业务表中!</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3>问题<FONT face="Times New Roman"> 1 </FONT>:矢量数据是如何存储的,上面哪一种说法是正确的?</FONT></P>
<P ><FONT size=3>问题<FONT face="Times New Roman"> 2 </FONT>:如果是第一种<FONT face="Times New Roman"> </FONT>:<FONT face="Times New Roman"> </FONT>那么<FONT face="Times New Roman"> </FONT>它的空间要素是<FONT face="Times New Roman">14</FONT>个字段是必须包括的么?<FONT face="Times New Roman"> </FONT>是不是点线面都是一样的都包括<FONT face="Times New Roman">14</FONT>个字段??这些表我们能在数据库中看到么?</FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">        </FONT>如果是第二种<FONT face="Times New Roman"> </FONT>:<FONT face="Times New Roman"> </FONT>那么<FONT face="Times New Roman"> </FONT>它的<FONT face="Times New Roman">shape</FONT>字段是不是仅仅包括坐标串?如果仅仅包括坐标串,又如何辨别这个数据的类型(点、线、面)呢?<FONT face="Times New Roman">  </FONT>还是<FONT face="Times New Roman">shape</FONT>字段把第一种说法中的空间信息(<FONT face="Times New Roman">fid</FONT>、<FONT face="Times New Roman">Numofpts</FONT>、<FONT face="Times New Roman">Entity</FONT>、<FONT face="Times New Roman">Eminx</FONT>、<FONT face="Times New Roman">Eminy</FONT>、<FONT face="Times New Roman">Emaxx</FONT>、<FONT face="Times New Roman">Emaxy</FONT>、<FONT face="Times New Roman">Eminz</FONT>、<FONT face="Times New Roman">Emaxz</FONT>、<FONT face="Times New Roman">min_measure</FONT>、<FONT face="Times New Roman">max_measure</FONT>、<FONT face="Times New Roman">Area</FONT>、<FONT face="Times New Roman">Len</FONT>和<FONT face="Times New Roman">points</FONT>等作为一个长字段来存储呢,具体的存储格式是怎样的?</FONT></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><FONT size=3>问题<FONT face="Times New Roman">3 </FONT>:我把监测站数据用<FONT face="Times New Roman">arccatalog</FONT>存放到数据库(<FONT face="Times New Roman">access</FONT>)<FONT face="Times New Roman">,</FONT>这样应该叫<FONT face="Times New Roman"> </FONT>个人<FONT face="Times New Roman">geodatabase.</FONT>它其中的包括监测站的表只有两个,如下:</FONT></P>
<P ><FONT size=3></FONT> </P>
<P ><FONT size=3>(图于附件中)</FONT><v:shape><v:imagedata><FONT size=3></FONT></v:imagedata></v:shape><FONT face="Times New Roman"><FONT size=3>      </FONT></FONT><v:shape><FONT face="Times New Roman"><FONT size=3> <v:imagedata></v:imagedata></FONT></FONT></v:shape></P>
<P ><FONT size=3><FONT face="Times New Roman">    </FONT>其中我仅仅自定义了一个<FONT face="Times New Roman">staname(</FONT>测站名称字段<FONT face="Times New Roman">)</FONT>。那么<FONT face="Times New Roman"> </FONT>好象上面的图既不同第一说法,也不同第二说法,怎么来解释这个问题?<FONT face="Times New Roman"> </FONT>上面的<FONT face="Times New Roman">id</FONT>为什么全都为<FONT face="Times New Roman"> 0</FONT>?<FONT face="Times New Roman"> </FONT>每个字段代表什么意思?<p></p></FONT></P>
<P ><FONT size=3><FONT face="Times New Roman">    </FONT>那么上面的矢量数据在数据库中应该怎么来表达呢?</FONT></P>
<P ><FONT size=3>问题<FONT face="Times New Roman"> </FONT>(<FONT face="Times New Roman">1</FONT>)<FONT face="Times New Roman">  </FONT>如果第二张表是要素索引表的话<FONT face="Times New Roman"> </FONT>那么第<FONT face="Times New Roman">2</FONT>表的<FONT face="Times New Roman"> mingx, mingy ,maxgx,maxgy</FONT>是什么意思,通过什么方式来表达<FONT face="Times New Roman">cell(</FONT>块<FONT face="Times New Roman">)</FONT>的呢?</FONT></P>
<P  align=left><FONT size=3>问题(<FONT face="Times New Roman">2</FONT>)第一表和第二表(索引表)是通过<FONT face="Times New Roman">objectid <->indexobjectid</FONT>建立连接的么?</FONT></P>
<P  align=left><p><FONT face="Times New Roman" size=3> </FONT></p></P>
<P ><p><FONT face="Times New Roman" size=3> </FONT></p></P><a href="attachment/2004-9/20049141454979.rar">2004-9/20049141454979.rar</a>
喜欢0 评分0
我门是害虫 我们是害虫 !!
游客

返回顶部