合并、拆分shapefile; 从shapefile导出ArcInfo generate format

今天遇到的几个关于ArcGIS的问题,版本9.3,系统win 7 (很抱歉以下中英混合的文字给您阅读带来可能的不便)

1. 东德西德合并前各自的shapefile

INPUT: a shape file of German states, DEU_admin1.shp. 这个文件可在www.gadm.org下载。

STEP1: 增加一列attribute区分哪个州在东德哪个州在西德:ArcToolbox->Data Management Tool->Fields->Add Field 。 设Field name为 E_W, Editor toolbar->Start Editing 打开attribute table,编辑E_W的值,0表示东德 1表示西德 (也可以从其他数据库文件导入)。

STEP2: ArcToolbox->Data Management Tool->Generalization->Dissolve 。 对话框中Dissolve Fields选E_W,statistics fields可以选择要保留的属性列,非数值类型的列,在statistic type中选LAST或者FIRST就好。OK确定。

STEP3: 现在显示的地图就是东德西德同时出现的地图。如果需要其中某一个,删除其中的一部分就得到剩余部分,保存即可。

 

2. 苏联,南斯拉夫,捷克斯洛伐克解体前的世界地图

The procedure is similar to the above section on former East and West Germany.

INPUT: the shape file of the current world, world.shp

 

STEP1: add an additional attribute column indicating the former Soviet Union, Yugoslavia and Czechoslovakia. In my case, I added a field called 'FORMER' and copy the values in the 'ISO2DIGIT' field to this new field. (ArcToolbox->Data Management Tool->Fields->Calculate Field), and change the FORMER values of succeeding countries. For instance, for Czech and Slovakia, I put a value called 'ZZ' to replace 'CZ' and 'SK' for Czech and Slovakia respectively.

STEP2: Dissovle by the values of 'FORMER' and keep the field 'ISO2DIGIT' by selecting statistic type 'LAST'

STEP3: open the attribute table, and change the values of ISO2DIGIT for the former countries to be any value you prefer, e.g. ZZ for Czechoslovakia, YY for Yugoslavia and XX for USSR.

 

3. 80年代的世界地图

So far, we have a shapefile of world with USSR, Yugoslavia and Czechoslovakia, and now we need to put the East and West Germany into it.

 

INPUT: the shapefiles generated from section 1 and 2

STEP1: open the new shapefile of the world in section 2, and delete the row representing Germany.

STEP2: open the shapfile of East and West Germany, and add a field called ISO2DIGIT in its attribute table. Add a value to this field, e.g., DX for East Germany and DE for West Germany.

STEP3: ArcToolbox->Data Management Tool->General->Append.  Input Dataset 选择 section1最后生成的DEU_admin1.shp, Target Dataset选择step1删除德国后的world.shp。 Schema Type选择NO_TEST, Field Map选择field : ISO2DIGIT. 确定即可。

 

4. 从shapefile生成ArcInfo generate format

关于此文件格式的说明,参见 http://courses.washington.edu/gis250/lessons/data_export/index.html#generate

有很多工具可以生成此种格式文件,这里通过ArcInfo workstation的命令行界面,使用shapearc生成。

STEP1: start menu in windows -> ArcInfo workstation -> Arc  然后出现一个dos界面,开头是Arc:

STEP2: change directories to where your input files exist, e.g.

Arc: &workspace X:\data

查看当前workspace的路径:

Arc: &show &workspace

查看当前路径的文件

Arc: &sys dir

STEP3: 生成converage 文件和generate format

Arc: shapearc < in_shape_file > < out_cover > {out_subclass}

e.g., 要产生polygon类型的coverage文件

Arc: shapearc world world_coverage poly

Arc: clean world_coverage  (this step is to fix topology errors)

Arc: ungenerate poly world_coverage world.gen

最后world.gen就是generate format的文件

你可能感兴趣的:(ArcGIS)