shp导入个人地理数据库报错啥意思

shp导入个人地理数据库报错啥意思,第1张

不规范的问题。

用清华三维将mdb格式的数据分层转为arcgis的shp文件,但是导入到arcgis过程中,出现了有些图层导入出错的问题。

这些shapefile文件是自己的程序生成的,不能排除生成的shapefile不规范的问题。先在Catalog窗口,能打开数据的属性吗,如果能,把Field页签截图看看。

shp文件中只有一个FeatureClass,并且FeatureClass中存储的要素性质是单一的, 譬如一个里面存储的全部是点, 或者全部是线等等

而gdb数据库中就不同了,一个gdb中有一个或者多个数据集(dataset), 而一个数据集中有一个或者多个地物类(FeatureClass),一个FeatureClass中有多个要素(Feature)

arcgis中的 shp文件存的是图形的信息,dbf中存的是属性的信息,dbf文件是shp文件的一部分。

将数据导入ArcGIS可以通过在arccatalog建立个人数据库,将数据导入数据库里,然后就可以在arcmap里导入了。

利用arcgis软件,打开属性表,选择对应的记录,右击单击有选项export就可以导出为dbf格式数据,直接就可以用excel打开并编辑计算;若无选中记录,默认全部导出;数据计算完毕后,仍保存为dbf格式;

在arcmap地图窗口打开原图层数据和重新计算保存后的表格数据,在图层上右击利用join命令,选择一个能唯一标识图形和属性表的字段,就可以把新数据连接到原始图层中。

在CATALOG中一个目录中新建一个GEODATABESE地理数据库,然后再改地理数据库中右键-import 把这个SHP文件导入即可。arcgis中怎么把shapfile导入成个人数据库

这里分享下ArcGIS带部分字段属性的shp文件的导入方法。

设备:联想电脑

系统:win7

软件:arcgis2014

1、首先打开arcgis软件,加载数据。

2、点击软件左侧内容列表的数据,单击右键数据—导出数据。

3、在保存类型选择文件和个人地理数据库要素类,选择要导入的数据库,输入名称,保存。

4、最后打开数据库之后,就可以看到shp文件已经导入数据中了。

Shapfile文件为ESRI公司的文件存储格式,并且得到了业界广

泛的支持。Shapfile格式是一种简单的,用非拓朴关系的形式存储几何位置和地理特征的属性信息的格式。虽然GeoServer采用Shapfile

文件可以快速的创建网上地图服务,但它的缺点确很明显:

1、Shapefile只支持一个图层,在实际中没有意义。

2、直接保用SHP文件不安全,Shapfile文件很容易被病毒或其他原因误删除。

3、GeoServer中用Shapfile文件作数据源的效率是很低的。

4、Shapfile中的汉字GeoServer不能解析,会出现乱码。

5、数据库可以方便的对地理信息进行查询。

用PostGIS管理空间数据

PostGIS支持GIST空间索引(附录1)、规范窗体,能很大的提高处理效率。

OGC格式只提供二维的几何体,且相关联的SRID从未深入的用于输入输出请求,PostGIS支持OpenGIS组织"Simple Features

for SQL"规范指定的所有GIS对象和函数,并进行了扩展,格式是EWKB、EWKT,其中增加了对3DZ,3DM和4D

坐标系的支持(当然三维、四维数据的OGC标准还未完全制定),深入引进了SRID信息。

空间数据表结构:PostGIS中存在两个必需的元数据表格, SPATIAL_REF_SYS(空间参考表格) 和 GEOMETRY_COLUMNS(几何体属性列),两个表用于存储空间数据库使用的坐标系统数字ID和文本描述。

PostGIS的shp2pgsql命令可以将Shapfile直接导入到数据库中也可以导出为SQL文件,推荐先导出为SQL文件再将此文件在SQL运行窗口中执行可将数据导入数据库。代码如下:

Shapfile到SQL语句:

shp2pgsql 路径/shp数据文件名 新建的数据表名 > 路径/SQL文件名sql

Shapfile直接入库:

shp2pgsql -c 路径/shp数据文件名 新建的数据表名 数据库名|psql -d 数据库名

举例说明:

如将一Shapfile文件“c:/roadshp”导入到数据表“road”中,数据库为“sjzmap”。

1、运行“命令提示符”。

2、切换至PostgreSQL数据库安装目录中的bin目录下。

3、执行此目录下的shp2pgsql命令:“shp2pgsql c:/roadshp road > c:/roadsql”。

4、如将此文件直接导入数据库(不推荐):“shp2pgsql -c c:/roadshp road sjzmap | psql -d sjzmap”。

5、使用pgAdmin3 选择数据库,再导入表。

注:

-d

Drops the database table before creating a new table with the data in the Shape file

-a

Appends data from the Shape file into the database table Note that

to use this option to load multiple files, the files must have the same

attributes and same data types

-c

Creates a new table and populates it from the Shape file This is the default mode

-p

Only produces the table creation SQL code, without adding any actual

data This can be used if you need to completely separate the table

creation and data loading steps

-D

Use the PostgreSQL "dump" format for the output data This can be

combined with -a, -c and -d It is much faster to load than the default

"insert" SQL format Use this for very large data sets

-s <SRID>

Creates and populates the geometry tables with the specified SRID

-k

Keep identifiers' case (column, schema and attributes) Note that attributes in Shapefile are all UPPERCASE

-i

Coerce all integers to standard 32-bit integers, do not create 64-bit

bigints, even if the DBF header signature appears to warrant it

-I

Create a GiST index on the geometry column

-w

Output WKT format, for use with older (0x) versions of PostGIS Note

that this will introduce coordinate drifts and will drop M values from

shapefiles

-W <encoding>

Specify encoding of the input data (dbf file) When used, all

attributes of the dbf are converted from the specified encoding to UTF8

The resulting SQL output will contain a SET CLIENT_ENCODING to UTF8

command, so that the backend will be able to reconvert from UTF8 to

whatever encoding the database is configured to use internally

以上就是关于shp导入个人地理数据库报错啥意思全部的内容,包括:shp导入个人地理数据库报错啥意思、arcgis将shp导入个人数据库只有字段没有内容、arcgis怎么将shp数据加上39等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/sjk/9407335.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-04-28
下一篇 2023-04-28

发表评论

登录后才能评论

评论列表(0条)

保存