【Arcgis for android】spatialite打开shapefile

互联网(free and share)

本文参考下面的博文:

http://blog.csdn.net/arcgis_all/article/details/8232976

Preparation:

一、把shp转换为数据库

1.打开spatialite-gis.exe

先 file->creating a new (empty)sqlite db,然后files->load shapefiles.

弹出框中填写  SRID(一般 4326)

然后就ok了。shapefile已经弄到数据库里了。

然后创建的sqlite db的那个文件就可以拿去项目里用啦,其他的参考上面那个网址的博文。

然后有人打开shp文件会提示,不存在的错误

Error:invalid shapefile unable to open xxx  for reading no such file or directory

去掉路径中文件夹里的中文应该就能解决,将shp放在另外的文件夹(路径不含中文)。

还有个问题就是,有些学计算机相关出身的可能不清楚,shapefile包括好几个文件 *.shp *shx之类的,不要单独使用一个 。shp文件