Package org.opengis.referencing

Examples of org.opengis.referencing.ReferenceIdentifier


        if (params != null) {
            for (GeneralParameterValue gParam : params) {
              if(gParam instanceof ParameterValue<?>)
              {               
                final ParameterValue<?> param = (ParameterValue<?>) gParam;
                    final ReferenceIdentifier name = param.getDescriptor().getName();
                    extractParameter(param, name);
              }
            }
        }
View Full Code Here


        if(!(descriptor instanceof ParameterDescriptor))
          continue;
       
        // get name and default value
        final ParameterDescriptor desc=(ParameterDescriptor) descriptor;
        final ReferenceIdentifier name = desc.getName();
        final Object value= desc.getDefaultValue();
       
          // //
          //
          // Requested GridGeometry2D parameter
          //
          // //
          if (descriptor.getName().equals(AbstractGridFormat.READ_GRIDGEOMETRY2D.getName())) {
            if(value==null)
              continue;
              final GridGeometry2D gg = (GridGeometry2D)value;
             
 
              requestedBBox = new ReferencedEnvelope((Envelope) gg.getEnvelope2D());
              requestedRasterArea = gg.getGridRange2D().getBounds();
              requestedGridToWorld=(AffineTransform) gg.getGridToCRS2D();
              continue;
          }
 
          // //
          //
          // Use JAI ImageRead parameter
          //
          // //
          if (name.equals(AbstractGridFormat.USE_JAI_IMAGEREAD.getName())) {
            if(value==null)
              continue;
              readType = ((Boolean)value)? ReadType.JAI_IMAGEREAD: ReadType.DIRECT_READ;
              continue;
          }
         
          // //
          //
          // Use Multithreading parameter
          //
          // //
          if (name.equals(JP2KFormat.USE_MULTITHREADING.getName())) {
            if(value==null)
              continue;
              useMultithreading = ((Boolean) value).booleanValue();
              continue;
          }
 
          // //
          //
          // Overview Policy parameter
          //
          // //
          if (name.equals(AbstractGridFormat.OVERVIEW_POLICY.getName())) {
            if(value==null)
              continue;
              overviewPolicy = (OverviewPolicy) value;
              continue;
          }
 
          if (name.equals(JP2KFormat.INPUT_TRANSPARENT_COLOR.getName())) {
            if(value==null)
              continue;
        inputTransparentColor = (Color) value;
        // paranoiac check on the provided transparent color
        inputTransparentColor = new Color(
            inputTransparentColor.getRed(),
            inputTransparentColor.getGreen(),
            inputTransparentColor.getBlue());
        continue;
 
      }
         
          // //
          //
          // Suggested tile size parameter. It must be specified with
          // the syntax: "TileWidth,TileHeight" (without quotes where TileWidth
          // and TileHeight are integer values)
          //
          // //
          if (name.equals(JP2KFormat.SUGGESTED_TILE_SIZE.getName())) {
              final String suggestedTileSize = (String) value;
 
              // Preliminary checks on parameter value
              if ((suggestedTileSize != null)
                      && (suggestedTileSize.trim().length() > 0)) {
View Full Code Here

    /**
     * Test of getName method, of class DefaultTemporalReferenceSystem.
     */
    @Test
    public void testGetName() {
        ReferenceIdentifier result = temporalReferenceSystem1.getName();
        assertFalse(temporalReferenceSystem2.getName().equals(result));
    }
View Full Code Here

    /**
     * Test of setName method, of class DefaultTemporalReferenceSystem.
     */
    @Test
    public void testSetName() {
        ReferenceIdentifier result = temporalReferenceSystem1.getName();
        ((DefaultTemporalReferenceSystem) temporalReferenceSystem1).setName(new NamedIdentifier(Citations.CRS, "new name"));
        assertFalse(temporalReferenceSystem1.getName().equals(result));
    }
View Full Code Here

   
    @Test
    public void testIdentifier() throws NoSuchAuthorityCodeException, FactoryException {
        Set<ReferenceIdentifier> identifiers = CartesianAuthorityFactory.GENERIC_2D.getIdentifiers();
        assertEquals(1, identifiers.size());
        final ReferenceIdentifier id = identifiers.iterator().next();
        assertEquals(Citations.EPSG, id.getAuthority());
        assertEquals(CODE, id.getCode());
    }
View Full Code Here

            Rectangle dim = null;

            if (parameters != null) {
                for (int i = 0; i < parameters.length; i++) {
                    final ParameterValue param = (ParameterValue) parameters[i];
                    final ReferenceIdentifier name = param.getDescriptor().getName();
                    if (name.equals(AbstractGridFormat.READ_GRIDGEOMETRY2D.getName())) {
                        final GridGeometry2D gg = (GridGeometry2D) param.getValue();
                        try {                       
                            requestedEnvelope = ReferencedEnvelope.create(gg.getEnvelope(), gg.getCoordinateReferenceSystem()).transform(crs, true);;
                        } catch (Exception e) {
                            requestedEnvelope = null;
View Full Code Here

        if (crs == null || crs.getIdentifiers() == null) {
            return -1; // not found
        }
        for (Iterator<ReferenceIdentifier> it = crs.getIdentifiers().iterator(); it
                .hasNext();) {
            ReferenceIdentifier id = it.next();
            Citation authority = id.getAuthority();
            if (authority != null
                    && authority.getTitle().equals(Citations.EPSG.getTitle())) {
                try {
                    return Integer.parseInt( id.getCode() );
                }
                catch (NumberFormatException nanException ){
                    continue;
                }
            }
View Full Code Here

                GeometryDescriptor gd = (GeometryDescriptor) type;
                if (gd.getCoordinateReferenceSystem() != null
                        && gd.getCoordinateReferenceSystem().getIdentifiers() != null) {
                    for (Iterator<ReferenceIdentifier> it = gd.getCoordinateReferenceSystem()
                            .getIdentifiers().iterator(); it.hasNext();) {
                        ReferenceIdentifier id = it.next();

                        if ((id.getAuthority() != null)
                                && id.getAuthority().getTitle().equals(Citations.EPSG.getTitle())) {
                            buf.append(":srid=" + id.getCode());
                            break;
                        }

                    }
                }
View Full Code Here

        //
        // //
        if (params != null) {
            for (GeneralParameterValue gParam : params) {
                final ParameterValue<?> param = (ParameterValue<?>) gParam;
                final ReferenceIdentifier name = param.getDescriptor()
                        .getName();
                extractParameter(param, name);
            }
        }
        setBaseParameters(reader);
View Full Code Here

         * go through at least one intermediate datum), then we will use the geocentric
         * transform below instead: it allows to concatenates many Bursa Wolf parameters
         * in a single affine transform.
         */
        if (molodenskiMethod != null) {
            ReferenceIdentifier identifier = DATUM_SHIFT;
            BursaWolfParameters bursaWolf  = null;
            if (sourceDatum instanceof DefaultGeodeticDatum) {
                bursaWolf = ((DefaultGeodeticDatum) sourceDatum).getBursaWolfParameters(targetDatum);
            }
            if (bursaWolf == null) {
View Full Code Here

TOP

Related Classes of org.opengis.referencing.ReferenceIdentifier

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.