bryanlynn
路人甲
路人甲
  • 注册日期2004-10-13
  • 发帖数4
  • QQ
  • 铜币171枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2841回复:5

CAD 格式转MAPGIS格式

楼主#
更多 发布于:2004-10-13 02:05
<P ><FONT size=7><FONT style="BACKGROUND-COLOR: #dddd22"><FONT color=#ff0000><FONT face="Times New Roman">CAD </FONT>转<FONT face="Times New Roman">MAPGIS<p></p></FONT></FONT></FONT></FONT></P>
<P >首先要了解一下这四个文件的文件名、意义以及用途。
在<FONT face="Times New Roman">MAPGIS6.1</FONT>安装完成后,在<FONT face="Times New Roman">../MAPGIS6.1/SLIB</FONT>目录下有四个文件,<FONT face="Times New Roman"> ARC_MAP.PNT</FONT>:<FONT face="Times New Roman">AUTOCAD</FONT>的块(符号)与<FONT face="Times New Roman">MAPGIS</FONT>子图对照表;
<FONT face="Times New Roman">ARC_MAP.LIN</FONT>:<FONT face="Times New Roman">AUTOCAD</FONT>的形(线型)与<FONT face="Times New Roman">MAPGIS</FONT>线型对照表;
<FONT face="Times New Roman">CAD_MAP.TAB</FONT>:<FONT face="Times New Roman">MAPGIS</FONT>的图层与<FONT face="Times New Roman">AUTOCAD</FONT>图层对照表;
<FONT face="Times New Roman">CAD_MAP.CLR</FONT>:<FONT face="Times New Roman">MAPGIS</FONT>的颜色与<FONT face="Times New Roman">AUTOCAD</FONT>颜色对照表
那么接下来讲如何编辑这四个对照表(文件):(注:要打开这四个对照表进行编辑,可直接启用<FONT face="Times New Roman">WINDOWS</FONT>的写字板或者是记事本,因为这四个文件都是文本文件格式)<FONT face="Times New Roman">
    1.</FONT>子图对照表<FONT face="Times New Roman"> ARC_MAP.PNT </FONT>打开此文件后我们会看到如下的格式<FONT face="Times New Roman"> 2341 12 </FONT>……<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman"> </FONT>前面一列<FONT face="Times New Roman">2341 2342 2343</FONT>代表<FONT face="Times New Roman">AUTOCAD</FONT>软件的块名(符号),后面一列<FONT face="Times New Roman">12 13 14</FONT>代表<FONT face="Times New Roman">MAPGIS</FONT>系统的代码<FONT face="Times New Roman">[</FONT>注:并非子图号,这个代码在数字测图系统里能看见。方法是启动数字测图系统,新建一个测量工程文件,然后就会看见一些地类编码的管理框,例如三角点<FONT face="Times New Roman"> </FONT>编码为<FONT face="Times New Roman">1110</FONT>,水准点<FONT face="Times New Roman"> </FONT>编码为<FONT face="Times New Roman">1210]
    2.</FONT>线型对照表<FONT face="Times New Roman"> ARC_MAP.LIN </FONT>打开此文件后我们会看到如下的格式<FONT face="Times New Roman"> 2341 12 </FONT>……<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman"> </FONT>前面一列<FONT face="Times New Roman">2341 2342 2343</FONT>代表<FONT face="Times New Roman">AUTOCAD</FONT>里的形名(注:如果某种线的线型是采用随层方式,那么这种线型是不能按照对照表转入到<FONT face="Times New Roman">MAPGIS</FONT>中;所以,如果有这种情况,请把线的线型改成为实际线型),后面一列<FONT face="Times New Roman">12 13 14</FONT>代表<FONT face="Times New Roman">MAPGIS</FONT>系统的代码<FONT face="Times New Roman">[</FONT>并非线型号,这个代码在数字测图系统里能看见。<FONT face="Times New Roman">
    3.</FONT>图层对照表<FONT face="Times New Roman"> CAD_MAP.TAB </FONT>打开此文件后我们会看到如下的格式<FONT face="Times New Roman"> 0 TREE_LAYER </FONT>……<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman"> </FONT>前面一列<FONT face="Times New Roman">0 1 2</FONT>代表<FONT face="Times New Roman">MAPGIS</FONT>系统的图层号,后面<FONT face="Times New Roman">TREE_LAYER STREET TIC</FONT>代表<FONT face="Times New Roman">AUTOCAD</FONT>里的图层名<FONT face="Times New Roman">
    4.</FONT>颜色对照表(<FONT face="Times New Roman">CAD_MAP.CLR</FONT>)打开此文件后我们会看到如下的格式。<FONT face="Times New Roman"> 1 10 </FONT>……<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman"> </FONT>前面一列<FONT face="Times New Roman">1 2 3</FONT>代表<FONT face="Times New Roman">MAPGIS</FONT>系统的颜色号,后面一列<FONT face="Times New Roman">10 4 6</FONT>代表<FONT face="Times New Roman">AUTOCAD</FONT>里的颜色号。如果这四个对照表编辑完成后请别忘了存盘。
<B>下面将讲述转换的步骤:</B>
第一步:将<FONT face="Times New Roman">AUTOCAD</FONT>的<FONT face="Times New Roman">DWG</FONT>格式,转换成为<FONT face="Times New Roman">AUTOCAD</FONT>的数据交换格式<FONT face="Times New Roman">DXF</FONT>格式(<FONT face="Times New Roman"> </FONT>关于转换<FONT face="Times New Roman">DXF</FONT>格式,请参阅有关<FONT face="Times New Roman">AUTOCAD</FONT>的书籍)。在转换时,要注意以下几点:
<FONT face="Times New Roman">    1 </FONT>在转换成为<FONT face="Times New Roman">DXF</FONT>文件格式时,最好选择<FONT face="Times New Roman">R12</FONT>的版本;
<FONT face="Times New Roman">    2 </FONT>在转换<FONT face="Times New Roman">DXF</FONT>文件时,不要对原图的块作爆破处理;
<FONT face="Times New Roman">    3 </FONT>在转换<FONT face="Times New Roman">DXF</FONT>文件时,注意原图是否有样条曲线,如果有最好作爆破处理。
第二步:将编辑好的四个对照文件拷贝到<FONT face="Times New Roman">MAPGIS61/SuvSlib/</FONT>目录下,然后将<FONT face="Times New Roman">MAPGIS</FONT>的系统设置目录中的系统库目录也指向<FONT face="Times New Roman">MAPGIS61/SuvSlib/</FONT>这个目录下。
第三步:启动<FONT face="Times New Roman">MAPGIS</FONT>的文件转换系统,进行转换就行了。<FONT face="Times New Roman"> <p></p></FONT></P>
<P ><FONT face="Times New Roman">AutoCAD</FONT>数据转<FONT face="Times New Roman">MapGIS
MapGIS6.1</FONT>版本对<FONT face="Times New Roman">AutoCAD</FONT>的<FONT face="Times New Roman">DXF</FONT>格式转<FONT face="Times New Roman">MapGIS</FONT>数据这一功能做了很大改动:第一,转换后数据量明显减小;第二,能将<FONT face="Times New Roman">AutoCAD</FONT>的块转成<FONT face="Times New Roman">MapGIS</FONT>的子图,<FONT face="Times New Roman">AutoCAD</FONT>的形(线型)转成<FONT face="Times New Roman">MapGIS</FONT>的线型,并能控制<FONT face="Times New Roman">AutoCAD</FONT>的图层和顔色转入<FONT face="Times New Roman">MapGIS</FONT>后的情况。下面讲<FONT face="Times New Roman">AutoCAD</FONT>数据转入<FONT face="Times New Roman">MapGIS</FONT>系统的几个主要步骤:<FONT face="Times New Roman">
</FONT>一.编辑数据转换用对应表文件<FONT face="Times New Roman">
</FONT>在<FONT face="Times New Roman">\MAPGIS6.1</FONT>安装目录<FONT face="Times New Roman">\SLIB\</FONT>中,包含几个文本文件,其中<FONT face="Times New Roman">arc_map.pnt</FONT>、<FONT face="Times New Roman">arc_map.lin</FONT>、<FONT face="Times New Roman">cad_map.tab</FONT>、<FONT face="Times New Roman">cad_map.clr</FONT>分别是<FONT face="Times New Roman">AutoCAD</FONT>数据转<FONT face="Times New Roman">MapGIS</FONT>的对应表文件(这些文件的名称是固定的,不能随意改动),可用记事本打开。每个文件的意义如下:<FONT face="Times New Roman">
arc_map.pnt</FONT>:<FONT face="Times New Roman">AutoCAD</FONT>的块名与<FONT face="Times New Roman">MapGIS</FONT>的编码<FONT face="Times New Roman"> </FONT>对应表;<FONT face="Times New Roman">
arc_map.lin</FONT>:<FONT face="Times New Roman">AutoCAD</FONT>的形名与<FONT face="Times New Roman">MapGIS</FONT>的编码<FONT face="Times New Roman"> </FONT>对应表;<FONT face="Times New Roman">
cad_map.tab</FONT>:<FONT face="Times New Roman">MapGIS</FONT>的图层号与<FONT face="Times New Roman">AutoCAD</FONT>的图层名对应表;<FONT face="Times New Roman">
cad_map.clr</FONT>:<FONT face="Times New Roman">MapGIS</FONT>的颜色号与<FONT face="Times New Roman">AutoCAD</FONT>的颜色号对应表。<FONT face="Times New Roman">
</FONT>下面讲如何编辑这四个对应表文件:<FONT face="Times New Roman">
1</FONT>.<FONT face="Times New Roman">arc_map.pnt</FONT>(<FONT face="Times New Roman">AutoCAD</FONT>的块名与<FONT face="Times New Roman">MapGIS</FONT>的编码对应表)<FONT face="Times New Roman">
</FONT>打开此文件后,会看到:<FONT face="Times New Roman">
2341          12
2342          13
2343 14
</FONT>……<FONT face="Times New Roman">   </FONT>……<FONT face="Times New Roman">
</FONT>第一列<FONT face="Times New Roman">2341  2342  2343</FONT>表示<FONT face="Times New Roman">AutoCAD</FONT>中的块名(符号);第二列<FONT face="Times New Roman">12  13  14</FONT>表示<FONT face="Times New Roman">MapGIS</FONT>系统的编码(注:并非子图号,这个编码<FONT face="Times New Roman"> </FONT>在数字测图系统里可以看见。方法是:启动数字测图系统,新建一个测量工程文件,将系统库目录设置成<FONT face="Times New Roman">\MAPGIS6.1</FONT>安装目录<FONT face="Times New Roman">\SuvSlib\</FONT>,然后点击菜单<FONT face="Times New Roman">\</FONT>工具<FONT face="Times New Roman">\</FONT>地物编码表<FONT face="Times New Roman">\</FONT>,就会看见各种地物的编码和其在<FONT face="Times New Roman">MapGIS</FONT>系统中的参数)。例如,<FONT face="Times New Roman">AutoCAD</FONT>中代表三角点的块的名称为<FONT face="Times New Roman">SJD</FONT>,<FONT face="Times New Roman">MapGIS</FONT>系统中的三角点符号的编码为<FONT face="Times New Roman">1110</FONT>,则把上表改为<FONT face="Times New Roman">
SJD  1110
</FONT>……<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman">
2</FONT>.<FONT face="Times New Roman">arc_map.lin</FONT>(<FONT face="Times New Roman">AutoCAD</FONT>的形名与<FONT face="Times New Roman">MapGIS</FONT>的编码<FONT face="Times New Roman"> </FONT>对应表)<FONT face="Times New Roman">
</FONT>打开此文件后,会看到:<FONT face="Times New Roman">
2341          12
2342          13
2344 14
</FONT>……<FONT face="Times New Roman">         </FONT>……<FONT face="Times New Roman">
</FONT>第一列<FONT face="Times New Roman">2341  2342  2343</FONT>表示<FONT face="Times New Roman">AutoCAD</FONT>中的形名(注:如果某种线的线型是采用随层方式,则这种线型不能按照对照表转入到<FONT face="Times New Roman">MapGIS</FONT>系统中。若有这种情况,请将线的形名“随层”改成该层对应的实际线型名);第二列<FONT face="Times New Roman">12  13  14</FONT>表示<FONT face="Times New Roman">MapGIS</FONT>系统的编码(注:并非线型号,这个编码<FONT face="Times New Roman"> </FONT>在数字测图系统里可以看见。方法是:启动数字测图系统,新建一个测量工程文件,将系统库目录设置成<FONT face="Times New Roman">\MAPGIS6.1</FONT>安装目录<FONT face="Times New Roman">\SuvSlib\</FONT>,然后点击菜单<FONT face="Times New Roman">\</FONT>工具<FONT face="Times New Roman">\</FONT>地物编码表<FONT face="Times New Roman">\</FONT>,就会看见各种地物的编码和其在<FONT face="Times New Roman">MapGIS</FONT>系统中的参数)。例如,<FONT face="Times New Roman">AutoCAD</FONT>中代表县界的形名为<FONT face="Times New Roman">XIANJIE</FONT>,<FONT face="Times New Roman">MapGIS</FONT>系统中县界对应的编码为<FONT face="Times New Roman">7140</FONT>,则把上表改为<FONT face="Times New Roman">
 XIANJIE  7140
</FONT>…………<FONT face="Times New Roman"> </FONT>……<FONT face="Times New Roman">
3</FONT>.<FONT face="Times New Roman">cad_map.tab</FONT>(<FONT face="Times New Roman">MapGIS</FONT>的图层号与<FONT face="Times New Roman">AutoCAD</FONT>的图层名对应表)<FONT face="Times New Roman">
 </FONT>打开此文件后,会看到:<FONT face="Times New Roman">
0            TREE_LAYER
1            STREET
2 TIC
</FONT>……<FONT face="Times New Roman">   </FONT>……<FONT face="Times New Roman">
</FONT>第一列<FONT face="Times New Roman">0  1  2</FONT>表示<FONT face="Times New Roman">MapGIS</FONT>系统中的图层号;第二列<FONT face="Times New Roman">TREE-LAYER  STREET  TIC</FONT>表示<FONT face="Times New Roman">AutoCAD</FONT>中的图层名。例如,<FONT face="Times New Roman">AutoCAD</FONT>中一个图层的层名为<FONT face="Times New Roman">JIEXIAN</FONT>,若想将它转入到<FONT face="Times New Roman">MapGIS</FONT>系统中的第<FONT face="Times New Roman">5</FONT>层。则把上表改为:<FONT face="Times New Roman">
5         JIEXIAN
</FONT>……<FONT face="Times New Roman">  </FONT>……<FONT face="Times New Roman">
4</FONT>.<FONT face="Times New Roman">cad_map.clr</FONT>(<FONT face="Times New Roman">MapGIS</FONT>的颜色与<FONT face="Times New Roman">AutoCAD</FONT>的颜色对应表)<FONT face="Times New Roman">
</FONT>打开此文件后,会看到:<FONT face="Times New Roman">
1           10
2           4
3           6
</FONT>……<FONT face="Times New Roman">  </FONT>……<FONT face="Times New Roman">
</FONT>第一列<FONT face="Times New Roman">1  2  3</FONT>表示<FONT face="Times New Roman">MapGIS</FONT>中的颜色号;第二列<FONT face="Times New Roman">10  4  6</FONT>表示<FONT face="Times New Roman">AutoCAD</FONT>中的颜色号。例如,<FONT face="Times New Roman">AutoCAD</FONT>中的大红色的顔色号为<FONT face="Times New Roman">1</FONT>,若想让它转入到<FONT face="Times New Roman">MapGIS</FONT>系统后的顔色与原来一样,则它在<FONT face="Times New Roman">MapGIS</FONT>系统中的顔色号应为<FONT face="Times New Roman">6</FONT>,这就需要把上表改为:<FONT face="Times New Roman">
6   1
</FONT>……<FONT face="Times New Roman">   </FONT>……<FONT face="Times New Roman">
</FONT>二.设置系统库<FONT face="Times New Roman">
</FONT>编辑好以上四个文本文件后,将它们拷贝到<FONT face="Times New Roman">\MAPGIS6.1</FONT>安装目录<FONT face="Times New Roman">\SuvSlib\</FONT>中,然后在<FONT face="Times New Roman">MapGIS</FONT>的“系统设置”中,将系统库目录指向<FONT face="Times New Roman">\MAPGIS6.1</FONT>安装目录<FONT face="Times New Roman">\SuvSlib\</FONT>。<FONT face="Times New Roman">
</FONT>三.<FONT face="Times New Roman">DWG</FONT>格式转<FONT face="Times New Roman">DXF</FONT>格式<FONT face="Times New Roman">
    </FONT>将<FONT face="Times New Roman">AutoCAD</FONT>的<FONT face="Times New Roman">DWG</FONT>格式的数据,转换成<FONT face="Times New Roman">AutoCAD</FONT>的公开数据格式<FONT face="Times New Roman">DXF</FONT>。在转换时,注意以下几点:<FONT face="Times New Roman">
1</FONT>.<FONT face="Times New Roman"> </FONT>最好选择<FONT face="Times New Roman">R12</FONT>版本;<FONT face="Times New Roman">
2</FONT>.不要对原图的块做爆破处理;<FONT face="Times New Roman">
3</FONT>.注意原图是否有样条曲线,如果有,最好做爆破处理。<FONT face="Times New Roman">
</FONT>四.<FONT face="Times New Roman">DXF</FONT>格式数据转入<FONT face="Times New Roman">MapGIS</FONT>系统<FONT face="Times New Roman">
</FONT>启动<FONT face="Times New Roman">MapGIS</FONT>系统的文件转换模块,用菜单<FONT face="Times New Roman">\</FONT>输入<FONT face="Times New Roman">\</FONT>装入<FONT face="Times New Roman">DXF\</FONT>,进行数据转换,完成后在输入编辑系统中打开转换过来的点、线文件,若有些线不显示,可能是因为在上面的<FONT face="Times New Roman">cad_map.clr</FONT>文件中没有给出该线在<FONT face="Times New Roman">AutoCAD</FONT>中的顔色号与在<FONT face="Times New Roman">MapGIS</FONT>系统中顔色号的对应数据,则转换时系统默认为转成<FONT face="Times New Roman">9</FONT>号色。将其统改成其它顔色,就可以显示出来了。<FONT face="Times New Roman">  </FONT></P><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" />
喜欢0 评分0
gis
gis
管理员
管理员
  • 注册日期2003-07-16
  • 发帖数15945
  • QQ554730525
  • 铜币25337枚
  • 威望15352点
  • 贡献值0点
  • 银元0个
  • GIS帝国居民
  • 帝国沙发管家
  • GIS帝国明星
  • GIS帝国铁杆
1楼#
发布于:2004-10-13 09:54
<img src="images/post/smile/dvbbs/em01.gif" />
举报 回复(0) 喜欢(0)     评分
风中小筑
路人甲
路人甲
  • 注册日期2004-03-19
  • 发帖数103
  • QQ
  • 铜币252枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2004-10-15 10:36
<img src="images/post/smile/dvbbs/em01.gif" />
举报 回复(0) 喜欢(0)     评分
gpddyss
路人甲
路人甲
  • 注册日期2004-06-29
  • 发帖数81
  • QQ
  • 铜币24枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2004-10-15 12:16
<img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em04.gif" />
举报 回复(0) 喜欢(0)     评分
yin1962
路人甲
路人甲
  • 注册日期2004-10-13
  • 发帖数56
  • QQ
  • 铜币196枚
  • 威望0点
  • 贡献值0点
  • 银元0个
4楼#
发布于:2004-11-02 15:38
<img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em08.gif" />
举报 回复(0) 喜欢(0)     评分
dyb228
路人甲
路人甲
  • 注册日期2004-10-28
  • 发帖数27
  • QQ
  • 铜币190枚
  • 威望0点
  • 贡献值0点
  • 银元0个
5楼#
发布于:2004-11-02 18:08
<img src="images/post/smile/dvbbs/em01.gif" /><img src="images/post/smile/dvbbs/em02.gif" /><img src="images/post/smile/dvbbs/em03.gif" /><img src="images/post/smile/dvbbs/em03.gif" /><img src="images/post/smile/dvbbs/em04.gif" /><img src="images/post/smile/dvbbs/em05.gif" /><img src="images/post/smile/dvbbs/em06.gif" /><img src="images/post/smile/dvbbs/em07.gif" /><img src="images/post/smile/dvbbs/em08.gif" />
举报 回复(0) 喜欢(0)     评分
游客

返回顶部