Package org.geotools.coverage.grid

Examples of org.geotools.coverage.grid.GridCoverageFactory.create()


        }
        final Color[] colors = new Color[]{
            Color.BLUE, Color.CYAN, Color.WHITE, Color.YELLOW, Color.RED
        };

        return factory.create("Float coverage", raster,
                new Envelope2D(DefaultGeographicCRS.WGS84, envX0, envY0, envWidth, envHeight),
                null, null,
                null, new Color[][]{colors}, null);
    }
View Full Code Here


    }

    private static void view(RenderedImage ri, GridGeometry2D gg, GridSampleDimension[] gsd) {
        final GridCoverageFactory factory = CoverageFactoryFinder.getGridCoverageFactory(null);

        GridCoverage2D rendered = factory.create("Merged coverage", ri,
                gg, gsd, null, null);

        rendered.view(ViewType.RENDERED).show();
    }
View Full Code Here

    // flip now, since grid size may be smaller
    heatMapGrid = flipXY(heatMapGrid);

    // convert to the GridCoverage2D required for output
    final GridCoverageFactory gcf = CoverageFactoryFinder.getGridCoverageFactory(null);
    final GridCoverage2D gridCov = gcf.create(
        "Process Results",
        heatMapGrid,
        argOutputEnv);

    return gridCov;
View Full Code Here

            tileSize));
    try {
      final AffineTransform2D gridToCRS = new AffineTransform2D(
          worldToScreenTransform.createInverse());
      final GridCoverageFactory gcf = CoverageFactoryFinder.getGridCoverageFactory(null);
      return gcf.create(
          coverageName,
          image,
          new GridGeometry2D(
              new GridEnvelope2D(
                  PlanarImage.wrapRenderedImage(
View Full Code Here

    Envelope envelope = new Envelope2D((CoordinateReferenceSystem)crs,
                      ge.getXMin(), ge.getYMin(),
                      ge.getWidth(), ge.getHeight());
    GridCoverageFactory factory = CoverageFactoryFinder.getGridCoverageFactory(null);
    GridCoverage2D gc = factory.create(name, (WritableRaster)m_Raster, envelope,
        null, null, null, null, null);
    m_BaseDataObject = gc;
    m_sName = name;
    m_sFilename = filename;
    m_LayerExtent = ge;
View Full Code Here

            raster.setSample(x, y, i, this.getCellValueAsDouble(x, y, i));
          }
        }

      }
      m_BaseDataObject = factory.create(getName(), (WritableRaster)raster, envelope,
                      null, null, null, null, null);

      System.gc();
    }
View Full Code Here

       
        // build the reference coverage into a byte array
        GridCoverageFactory factory = new GridCoverageFactory();
        BufferedImage bi = new BufferedImage(10, 10, BufferedImage.TYPE_4BYTE_ABGR);
        ReferencedEnvelope envelope = new ReferencedEnvelope(0, 10, 0, 10, CRS.decode("EPSG:4326"));
        GridCoverage2D test = factory.create("test", bi, envelope);
        ByteArrayOutputStream bos = new ByteArrayOutputStream();
        GeoTiffWriter writer = new GeoTiffWriter(bos);
        writer.write(test, null);
        writer.dispose();
       
View Full Code Here

        }
        final Color[] colors = new Color[]{
            Color.BLUE, Color.CYAN, Color.WHITE, Color.YELLOW, Color.RED
        };

        return factory.create("Float coverage", raster,
                new Envelope2D(DefaultGeographicCRS.WGS84, envX0, envY0, envWidth, envHeight),
                null, null,
                null, new Color[][]{colors}, null);
    }
View Full Code Here

    }

    private static void view(RenderedImage ri, GridGeometry2D gg, GridSampleDimension[] gsd) {
        final GridCoverageFactory factory = CoverageFactoryFinder.getGridCoverageFactory(null);

        GridCoverage2D rendered = factory.create("Merged coverage", ri,
                gg, gsd, null, null);

        rendered.view(ViewType.RENDERED).show();
    }
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.