科学网

 找回密码
  注册

tag 标签: shapefile

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

<备忘>Shapefile属性表中的中文显示乱码如何处理
热度 1 cgh 2015-10-23 09:13
备忘 :Shapefile 属性表中的中文显示乱码如何处理 问题:shapefile 的属性表中,中文字符显示为乱码。 原因:字符编码方式不匹配。系统解读的编码方式和文件实际存储的编码方式不匹配,无法正常显示。“ Before ArcGIS 10.2.1, shapefiles were encoded in the languagelocale of the system on which the shapefile was created. As of version 10.2.1,shapefiles are always encoded in UTF-8, which presents a problem on systemsthat use languages with multibyte character encodings, such as Chinese,Japanese or Russian. ” 解决: 1 、打补丁,参考esri 的文档下载补丁,目前只有10.2.1 和10.2.2 的补丁。原理是修改注册表,更改编码方式。更高版本似乎没有补丁。 2 、手动修改注册表,更改默认编码方式;所有的文件以后都以相同的指定默认编码方式打开。自己修改注册表,又一定风险。 3 、为特定shapefile 指定编码方式,创建一个与*shp 同名的*.cpg 文件用于存储编码方式信息,用记事本编辑,写入需要使用的编码方式,如OEM ,UTF-8 ,……。好处在于可以针对不同的中文编码方式。 参考资料: a 、http://www.faceye.net/search/101949.html b 、http://support.esri.com/en/knowledgebase/techarticles/detail/21106
个人分类: GIS|8819 次阅读|2 个评论
Python+xlrd: Create a Point Shapefile based on Lon/Lat
lixujeremy 2015-3-15 22:30
已知: Excel 文件 sheet 表中包含气象站点的温度、降水数据,并附上站点的经度与纬度,试探讨如何将该数据生成 Point Shapefile 文件,并为各个 Point 添加属性字段及赋值? 方法: Python+xlrd 读取 Excel 文件中的 sheet 内容, Python+Arcpy 实现 Point Shapefile 文件创建及其字段添加及赋值环节。 认真体会 CopyFeatures_management 、 AddField_management 、 UpdateCursor 。 附上测试 数据 及代码( xl2shp.rar , Updated by LI Xu on 2 May, 2015 )。运行结果如图 1 , 红框表示添加字段及赋值后的属性表。 图 1
个人分类: Python|3189 次阅读|0 个评论
X/Y Coordinate in Shapefile Convert to Geographic Coordinate
lixujeremy 2013-12-12 10:10
Sometimes, one shapefile, supported by Esri, displayed in ArcMap as follow, look at the red line, linear Unit is METER. And, If you want to read this shapefile to IDL/Matlab, in general, it does not work well with specific functions/routines. Due to its X/Y Coorfinate of entities’vertices, they are in Geodetic Coordinate Style, namely, every vertex coordinate value is not longitude/latitude, look at below in IDL/Matlab, See above two figures, imagine that these values can’t deliver coordinates correctly. And the result is not what you expect. Let me show it in the tool developed by David W. Fanning. How to convert Geodetic Coordinate to Geographic Coordinate properly? Method1, you can change display unit in ArcMap without convertion. Start ArcMap, add your shapefile. On the table of contents, right click “Layers”. Choose “Properties” form the menu. On the “Data Frame Properties”dialog, choose “General” Tab, look at the “Units” area, “Map: Meters” indicates the source map’s unit, shouldn’t be changed at present. Next, “Display: Meters”indicates the ArcMap Window’s unit, one can change to another, set this as below, Method2, convert to Geographic Coordinate. Start ArcMap, add another shapefile, which qualifies the geographic coordinate you want convert to. Look at the red line below, Add the shapefile you want to convert. On the table of contents, right click the shapefile’s name, choose “Data—Export Data” from the menu. On the Export Data dialog, attention,choose “the data frame”, and set the output location, that’s all. Let me see the result below. Acknowledgements This work was supported by SHAWNQIAO, KAYSNOWIVY, they both sent their solutions to me by Email. Special thanks to them, and appreciate their contributions and look forward to continued collaboration.
个人分类: GIS|3609 次阅读|0 个评论
[转载]shapefile文件组成
izkee 2010-8-18 15:08
扩展名 含 义 备注 .shp 存贮地理数据的几何特征:坐标、长度、面积等,是主文件 必备 .dbf 为 dBASE 文件,存贮地理数据的属性信息;主题的特征属性表也是以 DBF 文件形式存在的 必备 .shx 存贮地理数据几何特征的索引 必备 .sbn .sbx 这两个文件只有在进行了主题间空间关系查询、主题的空间联接和对 Shape 字段进行索引时才存在,它们用于存贮地物特征的索引 可选 .ain .aih 这两个文件只有在进行了表格间的关联 (Links) 操作时才存在,它们用于存贮进行关联的数据表或特征属性表的关联字段的索引 可选 .prj 如果 Shapefile 文件在 ArcGIS 9 中定义了投影,就会使用该文件存储投影信息 可选 .shp.xml ArcGIS 9 对 Shapefile 文件操作后形成的元数据文件 可选
个人分类: ArcGIS软件使用|3264 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-5 16:11

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部