Examples of Granule


Examples of org.geoserver.importer.mosaic.Granule

                    json.value(supp.getName());
                }
                json.endArray();
   
                if (sf instanceof Granule) {
                    Granule g = (Granule) sf;
                    if (g.getTimestamp() != null) {
                        json.key("timestamp").value(DATE_FORMAT.format(g.getTimestamp()));
                    }
                }
            }
        }
    }
View Full Code Here

Examples of org.geoserver.importer.mosaic.Granule

        JSONObject obj = (JSONObject) getFormatPostOrPut().toObject(getRequest().getEntity());
        FileData file = lookupFile();
        if (file instanceof SpatialFile) {
            SpatialFile sf = (SpatialFile) file;
            if (sf instanceof Granule) {
                Granule g = (Granule) sf;
                if (obj.has("timestamp")) {
                    String ts = obj.getString("timestamp");
                    try {
                        g.setTimestamp(ImportJSONWriter.DATE_FORMAT.parse(ts));
                    } catch (ParseException e) {
                        throw new RestletException("Could not parse timestamp: " + ts + ", must be "
                            + "format: " + ImportJSONWriter.DATE_FORMAT.toPattern(),
                            Status.CLIENT_ERROR_BAD_REQUEST);
                    }
View Full Code Here

Examples of org.geotools.coverageio.jp2k.Granule

             return;
        }
        
    final AbstractGridCoverage2DReader reader = new JP2KReader(file);
    final GeneralEnvelope envelope = reader.getOriginalEnvelope();
    final Granule granule = new Granule(new ReferencedEnvelope(envelope), file);
    final Level level = granule.getLevel(0);
    if (level != null){
      final AffineTransform btl = level.getBaseToLevelTransform();
        assertTrue(btl.isIdentity());
        final Rectangle bounds = level.getBounds();
        assertEquals(bounds.width, 400);
          assertEquals(bounds.height, 200);
        final int h = level.getHeight();
        final int w = level.getWidth();
        assertEquals(bounds.width, w);
          assertEquals(bounds.height, h);
         
        final double sx = level.getScaleX();
        final double sy = level.getScaleY();
        assertEquals(sx, 1.0, DELTA);
          assertEquals(sy, 1.0, DELTA);
          
        final String levelS = level.toString();
        if (TestData.isInteractiveTest()){
             if (LOGGER.isLoggable(java.util.logging.Level.INFO))
               LOGGER.info(levelS);
          }
      }
     
      final String granuleS = granule.toString();
      if (TestData.isInteractiveTest()){
           if (LOGGER.isLoggable(java.util.logging.Level.INFO))
             LOGGER.info(granuleS);
        }
     
View Full Code Here

Examples of structures.Granule

    //Fill in granule activations
    for (int y=0; y<this.numColumns; y++)
    {
      for (int x=0; x<myNetwork.getGranulesPerColumn(); x++)
      {
        Granule gc = this.myNetwork.getColumn(y).getGranules().get(x);
       
        if (gc != null && gc.isActive())
        {
          g.setColor(Color.GREEN);
          g.fillOval(COL_START_X+(COL_OFFSET*y), COL_START_Y+(GRANULE_RADIUS*x), GRANULE_RADIUS, GRANULE_RADIUS);
        }
        else if (gc !=  null && !gc.isActive())
        {
          g.setColor(Color.RED);
          g.fillOval(COL_START_X+(COL_OFFSET*y), COL_START_Y+(GRANULE_RADIUS*x), GRANULE_RADIUS, GRANULE_RADIUS);
        }
        else
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.