Package com.esri.sde.sdk.client

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


                    sampleBand = ratt.getBands()[0];
                    bitsPerSample = RasterCellType.valueOf(ratt.getPixelType()).getBitsPerSample();
                } catch (SeException e) {
                    throw new ArcSdeException(e);
                }
                final SeCoordinateReference seCoordRef = rasterColumn.getCoordRef();
                if (seCoordRef == null) {
                    throw new IllegalArgumentException(rasterTableName
                            + " has no coordinate reference system set");
                }
                LOGGER.finer("Looking CRS for raster column " + rasterTableName);
View Full Code Here


                layer.setExtent(ext);

                /*
                 * Define the layer's Coordinate Reference
                 */
                SeCoordinateReference coordref = TestData.getGenericCoordRef();
                layer.setCoordRef(coordref);

                /*
                 * Spatially enable the new table...
                 */
 
View Full Code Here

                    layer.setExtent(ext);

                    /*
                     * Define the layer's Coordinate Reference
                     */
                    SeCoordinateReference coordref = new SeCoordinateReference();
                    coordref.setXY(0D, 0D, 100D);
                    layer.setCoordRef(coordref);

                    /*
                     * Spatially enable the new table...
                     */
 
View Full Code Here

*/
public class ArcSDEUtilsTest {
    @Test
    public void testFindCompatibleCRS_Projected() throws Exception {

        SeCoordinateReference seCoordRefSys = new SeCoordinateReference();
        seCoordRefSys.setCoordSysByID(new SeObjectId(23030));

        CoordinateReferenceSystem expectedCRS = CRS.decode("EPSG:23030");
        CoordinateReferenceSystem compatibleCRS = ArcSDEUtils.findCompatibleCRS(seCoordRefSys);

        assertSame(expectedCRS, compatibleCRS);
View Full Code Here

        assertSame(expectedCRS, compatibleCRS);
    }

    @Test
    public void testFindCompatibleCRS_Geographic() throws Exception {
        SeCoordinateReference seCoordRefSys = new SeCoordinateReference();
        seCoordRefSys.setCoordSysByID(new SeObjectId(4326));

        CoordinateReferenceSystem expectedCRS = CRS.decode("EPSG:4326");
        CoordinateReferenceSystem compatibleCRS = ArcSDEUtils.findCompatibleCRS(seCoordRefSys);

        assertSame(expectedCRS, compatibleCRS);
View Full Code Here

    public void testFindCompatibleCRS_Null() throws Exception {
        CoordinateReferenceSystem compatibleCRS = ArcSDEUtils.findCompatibleCRS(null);

        assertSame(DefaultEngineeringCRS.CARTESIAN_2D, compatibleCRS);

        SeCoordinateReference seCoordRefSys = new SeCoordinateReference();

        compatibleCRS = ArcSDEUtils.findCompatibleCRS(seCoordRefSys);

        assertSame(DefaultEngineeringCRS.CARTESIAN_2D, compatibleCRS);
    }
View Full Code Here

                    SeRow r = q.fetch();
                    SeRasterAttr rAttr = r.getRaster(0);

                    SeObjectId rasterColumnId = rAttr.getRasterColumnId();
                    SeRasterColumn rasterColumn = new SeRasterColumn(connection, rasterColumnId);
                    SeCoordinateReference coordRef = rasterColumn.getCoordRef();
                    String coordRefWKT = coordRef.getCoordSysDescription();
                    CoordinateReferenceSystem crs;
                    try {
                        crs = CRS.parseWKT(coordRefWKT);
                    } catch (FactoryException e) {
                        throw new RuntimeException(e);
View Full Code Here

        LOGGER.finer("testConstructShape: testing " + geometry);

        Class<? extends Geometry> geometryClass = geometry.getClass();
        ArcSDEGeometryBuilder builder = ArcSDEGeometryBuilder.builderFor(geometryClass);

        SeCoordinateReference cr = TestData.getGenericCoordRef();
        if (LOGGER.isLoggable(Level.FINE)) {
            LOGGER.fine("****************** CRS extent: " + cr.getXYEnvelope());
        }
        Geometry equivalentGeometry = null;

        SeShape equivalentShape = builder.constructShape(geometry, cr);
        int expectedNumOfPoints = geometry.getNumPoints();
View Full Code Here

        Geometry createdGeometry;
        Geometry expectedGeometry;
        double[][][] sdeCoords;

        // create a sde CRS with a huge value range and 5 digits of presission
        SeCoordinateReference seCRS = TestData.getGenericCoordRef();

        for (int i = 0; i < expectedGeometries.length; i++) {
            expectedGeometry = expectedGeometries[i];
            sdeCoords = geometryToSdeCoords(expectedGeometry, seCRS);
View Full Code Here

                layer.setDescription("Layer Example");

                /*
                 * Define the layer's Coordinate Reference
                 */
                SeCoordinateReference coordref = getGenericCoordRef();

                // SeExtent ext = new SeExtent(-1000000.0, -1000000.0,
                // 1000000.0,
                // 1000000.0);
                SeExtent ext = coordref.getXYEnvelope();
                layer.setExtent(ext);
                layer.setCoordRef(coordref);

                layer.setCreationKeyword(configKeyword);

View Full Code Here

TOP

Related Classes of com.esri.sde.sdk.client.SeCoordinateReference

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.