Package net.opengis.gml

Examples of net.opengis.gml.DirectPositionType


   * <!-- begin-user-doc -->
     * <!-- end-user-doc -->
   * @generated
   */
    public NotificationChain basicSetPos(DirectPositionType newPos, NotificationChain msgs) {
    DirectPositionType oldPos = pos;
    pos = newPos;
    if (eNotificationRequired()) {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, GmlPackage.POINT_TYPE__POS, oldPos, newPos);
      if (msgs == null) msgs = notification; else msgs.add(notification);
    }
View Full Code Here


            ReferencedEnvelope envelope = (ReferencedEnvelope) envelopeNode.getValue();
            EnvelopeType env = Gml4wcsFactory.eINSTANCE.createEnvelopeType();
           
            env.setSrsName(CRS.lookupIdentifier(envelope.getCoordinateReferenceSystem(), true));
           
            DirectPositionType pos1 = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
            DirectPositionType pos2 = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
           
            pos1.setDimension(BigInteger.valueOf(2));
            pos2.setDimension(BigInteger.valueOf(2));
           
            pos1.setValue(Arrays.asList(envelope.getMinX(), envelope.getMinY()));
            pos2.setValue(Arrays.asList(envelope.getMaxX(), envelope.getMaxY()));

            env.getPos().add(pos1);
            env.getPos().add(pos2);
           
            spatialSubset.getEnvelope().add(envelope);
View Full Code Here

                final double origX = envelope.getLowerCorner().getOrdinate(0)+resX/2;
                final double origY = envelope.getUpperCorner().getOrdinate(1)+resY/2;

                // create offset point
                final PointType origin = Gml4wcsFactory.eINSTANCE.createPointType();
                final DirectPositionType dp = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
                origin.setPos(dp);
                origin.setSrsName(crsName);

                // create resolutions vector
                final VectorType resolutionVector = Gml4wcsFactory.eINSTANCE.createVectorType();

                //
                // Third dimension management
                //
                final Object rz = kvp.get("resz");
                if (rz != null) {
                    // afabiani: we consider 2D grdis only
                    throw new WcsException("3D grids are not supported.", InvalidParameterValue, "resz");
//                    // eventual depth
//                    final double resZ = Double.parseDouble((String) rz);
//                    // check that the envelope is 3D or throw an error
//                    if (bbox.getDimension() != 3)
//                        throw new WcsException("Found ResZ but envelope is of dimension "
//                                + bbox.getDimension(), InvalidParameterValue, "");
//                    final double origZ = bbox.getLowerCorner().getOrdinate(2);
//
//                    // 3D grid
//                    grid.setDimension(BigInteger.valueOf(3));
//                    // set the origin position
//                    dp.setDimension(grid.getDimension());
//                    dp.setValue(Arrays.asList(origX, origY, origZ));
//                    grid.setOrigin(origin);
//
//                    // set the resolution vector
//                    resolutionVector.setDimension(grid.getDimension());
//                    resolutionVector.setValue(Arrays.asList(resX, resY, resZ));
//                    grid.getOffsetVector().add(resolutionVector);
                } else {
                    // 2d grid
                    grid.setDimension(BigInteger.valueOf(2));
                    // set the origin position
                    dp.setDimension(grid.getDimension());
                    dp.setValue(Arrays.asList(origX, origY));
                    grid.setOrigin(origin);

                    // set the resolution vector
                    resolutionVector.setDimension(grid.getDimension());
                    resolutionVector.setValue(Arrays.asList(resX, resY));
View Full Code Here

                final VectorType offsetVector = (VectorType) grid.getOffsetVector().get(0);
                final List offsetValues = offsetVector.getValue();
                final double resX = (Double) offsetValues.get(0);
                final double resY = (Double) offsetValues.get(1);

                final DirectPositionType origin_ = grid.getOrigin().getPos();
                destinationSize = null;
                destinationG2W = new AffineTransform2D(resX, 0d, 0d, resY, (Double) origin_
                        .getValue().get(0), (Double) origin_.getValue().get(1));

            } else {
                throw new WcsException("Invalid Grid value:" + grid.toString(),
                        InvalidParameterValue, null);
            }
View Full Code Here

                final double origX = envelope.getLowerCorner().getOrdinate(0)+resX/2;
                final double origY = envelope.getUpperCorner().getOrdinate(1)+resY/2;

                // create offset point
                final PointType origin = Gml4wcsFactory.eINSTANCE.createPointType();
                final DirectPositionType dp = Gml4wcsFactory.eINSTANCE.createDirectPositionType();
                origin.setPos(dp);
                origin.setSrsName(crsName);

                // create resolutions vector
                final VectorType resolutionVector = Gml4wcsFactory.eINSTANCE.createVectorType();

                //
                // Third dimension management
                //
                final Object rz = kvp.get("resz");
                if (rz != null) {
                    // afabiani: we consider 2D grdis only
                    throw new WcsException("3D grids are not supported.", InvalidParameterValue, "resz");
//                    // eventual depth
//                    final double resZ = Double.parseDouble((String) rz);
//                    // check that the envelope is 3D or throw an error
//                    if (bbox.getDimension() != 3)
//                        throw new WcsException("Found ResZ but envelope is of dimension "
//                                + bbox.getDimension(), InvalidParameterValue, "");
//                    final double origZ = bbox.getLowerCorner().getOrdinate(2);
//
//                    // 3D grid
//                    grid.setDimension(BigInteger.valueOf(3));
//                    // set the origin position
//                    dp.setDimension(grid.getDimension());
//                    dp.setValue(Arrays.asList(origX, origY, origZ));
//                    grid.setOrigin(origin);
//
//                    // set the resolution vector
//                    resolutionVector.setDimension(grid.getDimension());
//                    resolutionVector.setValue(Arrays.asList(resX, resY, resZ));
//                    grid.getOffsetVector().add(resolutionVector);
                } else {
                    // 2d grid
                    grid.setDimension(BigInteger.valueOf(2));
                    // set the origin position
                    dp.setDimension(grid.getDimension());
                    dp.setValue(Arrays.asList(origX, origY));
                    grid.setOrigin(origin);

                    // set the resolution vector
                    resolutionVector.setDimension(grid.getDimension());
                    resolutionVector.setValue(Arrays.asList(resX, resY));
View Full Code Here

                final VectorType offsetVector = (VectorType) grid.getOffsetVector().get(0);
                final List offsetValues = offsetVector.getValue();
                final double resX = (Double) offsetValues.get(0);
                final double resY = (Double) offsetValues.get(1);

                final DirectPositionType origin_ = grid.getOrigin().getPos();
                destinationSize = null;
                destinationG2W = new AffineTransform2D(resX, 0d, 0d, resY, (Double) origin_
                        .getValue().get(0), (Double) origin_.getValue().get(1));

            } else
                throw new WcsException("Invalid Grid value:" + grid.toString(),
                        InvalidParameterValue, null);
View Full Code Here

TOP

Related Classes of net.opengis.gml.DirectPositionType

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.