Package com.bbn.openmap.dataAccess.shape

Examples of com.bbn.openmap.dataAccess.shape.EsriPolylineList


        });

        _addShape = new JMenuItem("Add Shape");
        _addShape.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                EsriPolylineList shapeData = new EsriPolylineList();
                ArrayList tabularData = new ArrayList();
                float[] part0 = new float[] { 35.0f, -120.0f, -25.0f, -95.0f,
                        56.0f, -30.0f };
                float[] part1 = new float[] { -15.0f, -110.0f, 13.0f, -80.0f,
                        -25.0f, 10.0f };
                EsriPolyline poly0 = new EsriPolyline(part0, OMGraphic.DECIMAL_DEGREES, OMGraphic.LINETYPE_RHUMB);
                EsriPolyline poly1 = new EsriPolyline(part1, OMGraphic.DECIMAL_DEGREES, OMGraphic.LINETYPE_RHUMB);
                shapeData.add(poly0); //part 1
                shapeData.add(poly1); //part 2
                shapeData.generate(_mapBean.getProjection());
                tabularData.add(0, "a value");
                _drawableLayer.addRecord(shapeData, tabularData);
                _drawableLayer.repaint();
            }
        });
View Full Code Here


            break;
        case SHAPE_TYPE_POLYGON:
            _list = new EsriPolygonList();
            break;
        case SHAPE_TYPE_POLYLINE:
            _list = new EsriPolylineList();
            break;
        default:
            _list = null;
        }
View Full Code Here

    public EsriGraphicList getPolyGeometry(int[][] indexData, int shapeType)
            throws Exception {

        EsriGraphicList list = null;
        if (shapeType == SHAPE_TYPE_POLYLINE) {
            list = new EsriPolylineList();
        } else if (shapeType == SHAPE_TYPE_POLYGON) {
            list = new EsriPolygonList();
        }

        int numVertices;

        int numShapes = indexData[1].length;

        for (int t = 0; t < numShapes; t++) {
            Integer shpRecordIndex = new Integer(_leis.readInt());
            /* int shpContentLength = */_leis.readInt();
            int shpType = _leis.readLEInt();

            if (shpType != SHAPE_TYPE_NULL) {

                /* double xLeft = */_leis.readLEDouble();
                /* double xBottom = */_leis.readLEDouble();
                /* double xRight = */_leis.readLEDouble();
                /* double xTop = */_leis.readLEDouble();
                int numParts = _leis.readLEInt();
                int numPoints = _leis.readLEInt();

                int[] offsets = new int[numParts];

                // OK, we don't want to create a sublist unless the poly
                // has multiple parts. Remember that. sublist will only
                // be created if there is more than one part.

                for (int n = 0; n < numParts; n++) {
                    offsets[n] = _leis.readLEInt();
                }

                float[] points;
                OMGraphic poly = null;
                EsriGraphicList sublist = null;

                if (numParts > 1) {
                    if (shapeType == SHAPE_TYPE_POLYLINE) {
                        sublist = new EsriPolylineList();
                    } else if (shapeType == SHAPE_TYPE_POLYGON) {
                        sublist = new EsriPolygonList();
                    }

                    sublist.setVague(true); // Treat sublist as one
View Full Code Here

            break;
        case SHAPE_TYPE_POLYGON:
            setList(new EsriPolygonList());
            break;
        case SHAPE_TYPE_POLYLINE:
            setList(new EsriPolylineList());
            break;
        default:
        }

        _model = new DbfTableModel(columnCount);
View Full Code Here

TOP

Related Classes of com.bbn.openmap.dataAccess.shape.EsriPolylineList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.