- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
折线分割(Broken line segmentation)
折线分割(Broken line segmentation)
dim lyr as mapxlib. layer
dim ds as mapxlib dataset.
dim istemplayer as boolean 判断是否临时图层
dim divideyn as boolean 判断是否按下图元分割按钮
updateflag as integer dim
private sub featuredivide () 在选中图元上画线, 为分割后处理作准备
set lyr = map1.layers (1)
divideyn = true
if lyr.selection.count 1 then 判断是否只选中一个图元, 若不是则退出当前过程
msgbox 分割前请先选择一个图元!
divideyn = false
exit sub
end if
if lyr.selection (1) locally mifeaturetyperegion then 若选中的图元不是区域图元则退出
msgbox 请在分割前选择一个区域图元!
divideyn = false
exit sub
end if
lyr editable = true.
set map1.layers.insertionlayer = lyr
map1.currenttool = miaddlinetool 改变成添加直线的工具
end sub
private sub featuredivided () 分割后处理
dim lineftr as mapxlib. feature tempftr as mapxlib. feature regoinftr as mapxlib. feature regoinftr1 as mapxlib. feature regoinftr2 as mapxlib. feature
dim lyr as mapxlib. layer
dim ftrfac as mapxlib.featurefactory, ftrnew1 as mapxlib. feature ftrnew2 as mapxlib. feature
dim itstpts as mapxlib. points, pts1 as new mapxlib. points, pts2 as new mapxlib. points
ptschange as boolean dim, i as integer, j as integer
dim ds as mapxlib. dataset, flds as mapxlib fields
dim minx as double, miny as double, maxx as double, maxy 存储前后两点的坐标值 as double
set lyr = map1.layers (1) lyr指向最上层图层
set lineftr = lyr.allfeatures (lyr.allfeatures.count) 返回最后一个图元
set regoinftr = lyr.selection (1) regoinftr指向当前已选中的区域图元
set ftrfac = map1.featurefactory
on error resume next
set ds = map1.datasets.add (midatasetlayer, lyr, )
set flds = ds fields
if not ersectiontest (regoinftr, lineftr, mapxlib.miintersectfeature) then 若不相交, 提示退出
msgbox 线与所选区域不相交, 无法分割, 请重新操作!
divideyn = false
lyr.deletefeature lineftr
map1.currenttool = miselecttool
exit sub
end if
set itstpts = ersectionpoints (regoinftr, lineftr)
if itstpts. count 2.
msgbox 直线与区域图元并未相交于两点, 请重新操作!
divideyn = false
lyr.deletefeature lineftr
map1.currenttool = miselecttool
exit sub
end if
if regoinftr.parts.count 1 then
msgbox 图元太复杂, 无法分割!
divideyn = false
lyr.deletefeature lineftr
map1.currenttool =
您可能关注的文档
- 当前国库监管工作中存在的问题及对策(Problems and Countermeasures in current treasury supervision).doc
- 当前仓库管理系统存在的问题(Problems in current warehouse management system).doc
- 当前中医发展面临的困难与对策——中医为何要现代化(Difficulties and Countermeasures for the development of TCM at present -- why should TCM be modernized).doc
- 当前形势下高职院校会展策划与管理专业建设存在的问题及对策(Problems and Countermeasures in the construction of exhibition planning and management specialty in Higher Vocational Colleges under the current situation).doc
- 当前我国金融风险的特殊性及其防范对策(The particularity of financial risk in China and Its Countermeasures).doc
- 当前活动课程建设的问题与对策_1438(Problems and Countermeasures of current activity curriculum construction _1438).doc
- 当宅男遇到超女(When otaku meets super girl).doc
- 当心自毁前程管理的职场禁忌(Beware of self destructive career management career taboos).doc
- 当跳槽从管理青楼进入职场(When job hopping goes from management brothel to job market).doc
- 当预言失败时(When the prophecy fails).doc
- 护发养生(Hair care).doc
- 护基期末考题(Base exam).doc
- 护士工作站基本流程操作文档(Nurse workstation basic flow operation document).doc
- 护士2011考题(Nurse 2011 examination questions).doc
- 护士案例(Nurse case).doc
- 护士必看(Nurses must see).doc
- 护心小秘诀(Tips for protecting your mind).doc
- 护理学导轮(Nursing guide wheel).doc
- 护理本科生毕业论文指导中存在的问题与对策(Problems and Countermeasures in the guidance of graduation theses for nursing undergraduates).doc
- 护理规划(Nursing planning).doc
最近下载
- (PPT)考勤管理制度.ppt VIP
- 安顺西秀富民村镇银行招聘考试真题及答案2022.pdf VIP
- 2021年青岛市临床营养质控中心年终考核暨下半年工作检查.docx VIP
- 2025年压力容器考试题库3带答案.doc VIP
- 2024贵州安顺普定富民村镇银行招聘笔试备考题库及答案解析.docx VIP
- 昆明元朔建设有限公司高速收费岗位笔试题.docx VIP
- 2021年安徽高考政治试卷.pdf VIP
- 九年级化学演示实验通知单(全册)资料.doc VIP
- 提高基建档案规范化管理——[ 获奖QC 成果发布 ].pdf VIP
- 2025贵州望谟富民村镇银行股份有限公司招聘考试参考题库附答案解析.docx VIP
文档评论(0)