如何使用C#编辑shapefile [英] How to edit a shapefile using C#

查看:300
本文介绍了如何使用C#编辑shapefile的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何编辑shapefile?我正在使用ocx处理地图。

解决方案

您将有更好的运气找到OCX留言板。你可能会很幸运,在这里找到一个使用了你正在使用的相同API的人,但更有可能在专用主板上。

谷歌搜索OCX shapefile有很多结果可以开始使用。


首先,我不确定你为什么要使用ocx来编辑shapefile。显然,你可以,但这不是一种正常的方法。您可以使用Windows窗体执行相同的操作。



如果您想知道如何编辑shapefile,(假设您的意思是.shp文件),则需要看看ArcObjects。你可以在这里开始 [ ^ ]。



ArcObjects非常复杂你真的必须了解界面才能充分利用它们。



如果你是全新的,这是一个陡峭的学习曲线。我建议购买两卷Exploring ArcObjects。虽然它是为早期版本的Arc编写的,但大部分信息都是相同的,并为您提供了很多如何使用这些对象的好例子。


通过互联网搜索为了阅读和编辑shapefile,我来到了这篇文章。不幸的是,这个问题的信息似乎不多。想,我会用一些usefuly信息更新。



如上所述,ArcObjects确实提供了用于读取和编辑shapfile的完整feldge功能,但不幸的是,它是一个许可的软件,并没有多少能够负担得起它的功能。



这里有一些开源工具,提供了一种简单的方法来读取和编辑shapefile:



SharpMap c#Web和桌面的OpenSource库 - http://sharpmap.codeplex.com/ [ ^ ]





MapWindow - http://www.mapwindow.org/ [ ^ ]



DotSpatial C#开源库(MapWindow的扩展库版本):http://dotspatial.codeplex.com/ [ ^ ]



网络拓扑套件(NTS)具有C#的绑定: https://code.google.com/p/nettopologysuite/ [ ^ ]



Shapelib为Shapefile提供C#绑定

how to edit a shapefile? I am working on maps using ocx.

解决方案

You will have better luck finding an OCX message board. You might strike lucky and find someone here that has used the same API you are using, but it is much more likely on a dedicated board.
Googling "OCX shapefile" yeilds plenty of results to get started.


First, I'm not sure why you're using ocx to edit shapefiles. Obviously, you can, but that's not a normal method. You can use Windows Forms to do the same thing.

If you want to know how to edit shapefiles, (assuming you mean a .shp file), you need to look at ArcObjects. You can start here[^].

ArcObjects are incredibly complex and you really have to understand the interfaces in order to get the most out of it.

If you are brand new, it's a steep learning curve. I would suggest buying the two volume Exploring ArcObjects. Even though it was written for an earlier version of Arc, the majority of the information is the same and gives you a lot of good examples of how to use the objects.


Searching through the internet for reading and editing a shapefile, i came accross this post. Unfortunately, there seems to be not much information for the question. Thought, i would update with some usefuly information.

Like mentioned above, ArcObjects do provide the full feldge functionality for reading and editing the shapfile, but unfortunately, its a licenced software and not many can afford to utilize its functionality.

Here are some opensource tools which provide an easy way of reading and editing the shapefile:

SharpMap c# OpenSource library for both Web and Desktop - http://sharpmap.codeplex.com/[^]


MapWindow - http://www.mapwindow.org/[^]

DotSpatial C# Opensource library (Extended Library version of MapWindow) : http://dotspatial.codeplex.com/[^]

Net Topology Suit (NTS) has bindings for C#: https://code.google.com/p/nettopologysuite/[^]

Shapelib has C# bindings for Shapefile


这篇关于如何使用C#编辑shapefile的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆