zoukankan      html  css  js  c++  java
  • 如何将区域插入到表中【转载】

    如何将区域插入到表中

     文章来源:http://www.gisdn.com/ShowPost.asp?id=2191

     //vb.Net编程


    Dim conn As New MapInfo.Data.MIConnection
    conn.Open()
    Dim dPoints(5) As MapInfo.Geometry.DPoint
    dPoints(0) = New MapInfo.Geometry.DPoint(-103, 32)
    dPoints(1) = New MapInfo.Geometry.DPoint(-97, 26)
    dPoints(2) = New MapInfo.Geometry.DPoint(-88, 29)
    dPoints(3) = New MapInfo.Geometry.DPoint(-94, 36)
    dPoints(4) = New MapInfo.Geometry.DPoint(-103, 32)
    Dim g As MapInfo.Geometry.FeatureGeometry = New MapInfo.Geometry.MultiPolygon(MapControl1.Map.GetDisplayCoordSys(), MapInfo.Geometry.CurveSegmentType.Linear, dPoints)
    Dim p As MapInfo.Geometry.MultiPolygon = CType(g, MapInfo.Geometry.MultiPolygon)
    MsgBox(p.Area(MapInfo.Geometry.AreaUnit.SquareMile).ToString())
    Dim sis As MapInfo.Styles.SimpleInterior = New MapInfo.Styles.SimpleInterior(9, System.Drawing.Color.Purple)
    Dim lw As MapInfo.Styles.LineWidth = New MapInfo.Styles.LineWidth(3, MapInfo.Styles.LineWidthUnit.Point)
    Dim sl As MapInfo.Styles.SimpleLineStyle = New MapInfo.Styles.SimpleLineStyle(lw, 3)
    Dim ar As MapInfo.Styles.AreaStyle = New MapInfo.Styles.AreaStyle(sl, sis)


    Dim cs As MapInfo.Styles.CompositeStyle = New MapInfo.Styles.CompositeStyle(ar, Nothing, Nothing, Nothing)
    Dim t As MapInfo.Data.Table = conn.Catalog.GetTable("USA")
    Dim f As MapInfo.Data.Feature = New Feature(g, cs)
    Dim k As MapInfo.Data.Key = t.InsertFeature(f)

  • 相关阅读:
    一款非常好用的范围滑动插件
    设置滚动条样式
    Qml 定义 constant
    qml 中 使用 shader
    Qt ImageProvider 的使用
    qt 汉化 国际化
    qt rcc 使用
    CentOS7/RHEL7 pacemaker+corosync高可用集群搭建
    Ubunt平台Qt出现:-1: error: cannot find -lgl
    排序-堆排序
  • 原文地址:https://www.cnblogs.com/lauer0246/p/1292094.html
Copyright © 2011-2022 走看看