zoukankan      html  css  js  c++  java
  • andriod arcgis createPolygons创建带空的面

     private void createPolygons() {
    
        // create input polygon 1
        PointCollection pointsPoly = new PointCollection(SpatialReferences.getWebMercator());
        pointsPoly.add(new Point(-13160, 6710100));
        pointsPoly.add(new Point(-13300, 6710500));
        pointsPoly.add(new Point(-13760, 6710730));
        pointsPoly.add(new Point(-14660, 6710000));
        pointsPoly.add(new Point(-13960, 6709400));
        inputPolygon1 = new Polygon(pointsPoly);
    
        // create and add a blue graphic to show input polygon 1
        SimpleFillSymbol fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0x990000CC, lineSymbol);
        inputGeometryOverlay.getGraphics().add(new Graphic(inputPolygon1, fillSymbol));
    
        // create input polygon 2 with a green (0xFF009900) symbol
        // outer ring
        PointCollection outerRingSegmentCollection = new PointCollection(SpatialReferences.getWebMercator());
        outerRingSegmentCollection.add(new Point(-13060, 6711030));
        outerRingSegmentCollection.add(new Point(-12160, 6710730));
        outerRingSegmentCollection.add(new Point(-13160, 6709700));
        outerRingSegmentCollection.add(new Point(-14560, 6710730));
        outerRingSegmentCollection.add(new Point(-13060, 6711030));
        Part outerRing = new Part(outerRingSegmentCollection);
    
        // inner ring
        PointCollection innerRingSegmentCollection = new PointCollection(SpatialReferences.getWebMercator());
        innerRingSegmentCollection.add(new Point(-13060, 6710910));
        innerRingSegmentCollection.add(new Point(-12450, 6710660));
        innerRingSegmentCollection.add(new Point(-13160, 6709900));
        innerRingSegmentCollection.add(new Point(-14160, 6710630));
        innerRingSegmentCollection.add(new Point(-13060, 6710910));
        Part innerRing = new Part(innerRingSegmentCollection);
    
        // add both parts (rings) to a part collection and create a geometry from it
        PartCollection polygonParts = new PartCollection(outerRing);
        polygonParts.add(innerRing);
        inputPolygon2 = new Polygon(polygonParts);
    
        // create and add a green graphic to show input polygon 2
        fillSymbol = new SimpleFillSymbol(SimpleFillSymbol.Style.SOLID, 0x99009900, lineSymbol);
        inputGeometryOverlay.getGraphics().add(new Graphic(inputPolygon2, fillSymbol));
      }
  • 相关阅读:
    收集一些dos网络配置命令,从新获取ip刷新dns
    多个线程访问共享对象和数据的方式
    Oracle rownum 分页, 排序
    ORACLE中用rownum分页并排序的SQL语句
    CentOS 6.5安装MongoDB 2.6(多yum数据源)
    【编程练习】收集的一些c++代码片,算法排序,读文件,写日志,快速求积分等等
    java枚举使用详解
    PHP+MySQL动态网站开发从入门到精通(视频教学版)
    Premiere Pro CS6标准教程
    黑客攻防:实战加密与解密
  • 原文地址:https://www.cnblogs.com/gisoracle/p/7645682.html
Copyright © 2011-2022 走看看