Examples of SDEPoint


Examples of com.esri.sde.sdk.client.SDEPoint

    }

    private GridEnvelope computeImageGridRange(final int level, final SeRasterAttr rasterAttributes)
            throws SeException {

        SDEPoint imageOffset = rasterAttributes.getImageOffsetByLevel(level);
        int xOffset = (int) (imageOffset == null ? 0 : imageOffset.getX());
        int yOffset = (int) (imageOffset == null ? 0 : imageOffset.getY());

        int imageWidth = rasterAttributes.getImageWidthByLevel(level);
        int imageHeight = rasterAttributes.getImageHeightByLevel(level);

        return new GridEnvelope2D(xOffset, yOffset, imageWidth, imageHeight);
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

            double statsMax = bandInfo.getStatsMax();
            RasterCellType nativeCellType = bandInfo.getCellType();
            bandInfo.noDataValue = RasterUtils.determineNoDataValue(numBands, statsMin, statsMax,
                    nativeCellType);
        }
        SDEPoint tOrigin;
        try {
            tOrigin = band.getTileOrigin();
        } catch (SeException e) {
            throw new ArcSdeException(e);
        }
        bandInfo.tileOrigin = new Point((int)tOrigin.getX(), (int)tOrigin.getY());
    }
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

            coords = geom.getCoordinates();

            for (int i = 0; i < coords.length; i++) {
                c = coords[i];
                allPoints.add(new SDEPoint(c.x, c.y));
            }
        }

        SDEPoint[] points = new SDEPoint[allPoints.size()];
        allPoints.toArray(points);
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

        Coordinate c;

        for (int i = 0; i < nCoords; i++) {
            c = coords[i];

            points[i] = new SDEPoint(c.x, c.y);
        }

        return points;
    }
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

     */
    @Test
    public void testPointFormat() throws SeException {
        int numPts = 1;
        SDEPoint[] ptArray = new SDEPoint[numPts];
        ptArray[0] = new SDEPoint(3000, 100);

        SeShape point = new SeShape();
        point.generatePoint(numPts, ptArray);

        int numParts = 0;
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

     */
    @Test
    public void testMultiPointFormat() throws SeException {
        int numPts = 4;
        SDEPoint[] ptArray = new SDEPoint[numPts];
        ptArray[0] = new SDEPoint(3000, 100);
        ptArray[1] = new SDEPoint(3000, 300);
        ptArray[2] = new SDEPoint(4000, 300);
        ptArray[3] = new SDEPoint(4000, 100);

        SeShape point = new SeShape();
        point.generatePoint(numPts, ptArray);

        double[][][] coords = point.getAllCoords();
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

     */
    @Test
    public void testLineStringFormat() throws SeException {
        int numPts = 4;
        SDEPoint[] ptArray = new SDEPoint[numPts];
        ptArray[0] = new SDEPoint(3000, 100);
        ptArray[1] = new SDEPoint(3000, 300);
        ptArray[2] = new SDEPoint(4000, 300);
        ptArray[3] = new SDEPoint(4000, 100);

        SeShape point = new SeShape();
        int numParts = 1;
        int[] partOffsets = { 0 }; // index of each part's start in the gobal
        // coordinate array
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

     */
    @Test
    public void testMultiLineStringFormat() throws SeException {
        int numPts = 4;
        SDEPoint[] ptArray = new SDEPoint[numPts];
        ptArray[0] = new SDEPoint(3000, 100);
        ptArray[1] = new SDEPoint(3000, 300);
        ptArray[2] = new SDEPoint(4000, 300);
        ptArray[3] = new SDEPoint(4000, 100);

        SeShape point = new SeShape();
        int numParts = 2;
        int[] partOffsets = { 0, 2 }; // index of each part's start in the
        // gobal coordinate array
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

        partOffsets[0] = 0;

        SDEPoint[] ptArray = new SDEPoint[numPts];

        // simple polygon
        ptArray[0] = new SDEPoint(1600, 1200);
        ptArray[1] = new SDEPoint(2800, 1650);
        ptArray[2] = new SDEPoint(1800, 2000);
        ptArray[3] = new SDEPoint(1600, 1200);

        SeShape polygon = new SeShape();
        polygon.generatePolygon(numPts, numParts, partOffsets, ptArray);

        double[][][] coords = polygon.getAllCoords();

        assertEquals("Num of parts invalid", numParts, coords.length);
        assertEquals("Num subparts invalid", 1, coords[0].length);
        assertEquals("Num of points invalid", 2 * 4, coords[0][0].length);

        numPts = 14;
        numParts = 1;
        ptArray = new SDEPoint[numPts];
        partOffsets = new int[numParts];
        partOffsets[0] = 0;

        // part one
        ptArray[0] = new SDEPoint(100, 1100);
        ptArray[1] = new SDEPoint(1500, 1100);
        ptArray[2] = new SDEPoint(1500, 1900);
        ptArray[3] = new SDEPoint(100, 1900);
        ptArray[4] = new SDEPoint(100, 1100);

        // Hole - sub part of part one
        ptArray[5] = new SDEPoint(200, 1200);
        ptArray[6] = new SDEPoint(200, 1500);
        ptArray[7] = new SDEPoint(500, 1500);
        ptArray[8] = new SDEPoint(500, 1700);
        ptArray[9] = new SDEPoint(800, 1700);
        ptArray[10] = new SDEPoint(800, 1500);
        ptArray[11] = new SDEPoint(500, 1500);
        ptArray[12] = new SDEPoint(500, 1200);
        ptArray[13] = new SDEPoint(200, 1200);

        polygon = new SeShape();
        polygon.generatePolygon(numPts, numParts, partOffsets, ptArray);

        coords = polygon.getAllCoords();
View Full Code Here

Examples of com.esri.sde.sdk.client.SDEPoint

        partOffsets[1] = 14;

        SDEPoint[] ptArray = new SDEPoint[numPts];

        // part one
        ptArray[0] = new SDEPoint(100, 1100);
        ptArray[1] = new SDEPoint(1500, 1100);
        ptArray[2] = new SDEPoint(1500, 1900);
        ptArray[3] = new SDEPoint(100, 1900);
        ptArray[4] = new SDEPoint(100, 1100);

        // Hole - sub part of part one
        ptArray[5] = new SDEPoint(200, 1200);
        ptArray[6] = new SDEPoint(200, 1500);
        ptArray[7] = new SDEPoint(500, 1500);
        ptArray[8] = new SDEPoint(500, 1700);
        ptArray[9] = new SDEPoint(800, 1700);
        ptArray[10] = new SDEPoint(800, 1500);
        ptArray[11] = new SDEPoint(500, 1500);
        ptArray[12] = new SDEPoint(500, 1200);
        ptArray[13] = new SDEPoint(200, 1200);

        // part two
        ptArray[14] = new SDEPoint(1600, 1200);
        ptArray[15] = new SDEPoint(2800, 1650);
        ptArray[16] = new SDEPoint(1800, 2000);
        ptArray[17] = new SDEPoint(1600, 1200);

        SeShape multipolygon = new SeShape();
        multipolygon.generatePolygon(numPts, numParts, partOffsets, ptArray);

        double[][][] coords = multipolygon.getAllCoords();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.