Package org.geotools.coverage.grid.io

Examples of org.geotools.coverage.grid.io.AbstractGridFormat


     */
    @Test
    @SuppressWarnings("rawtypes")
    public void timeAdditionalDimRanges() throws Exception {
   
        final AbstractGridFormat format = TestUtils
                .getFormat(timeAdditionalDomainsRangeURL);
        ImageMosaicReader reader = TestUtils.getReader(timeAdditionalDomainsRangeURL, format);
        try {
   
            final String[] metadataNames = reader.getMetadataNames();
View Full Code Here


        String files[] = new String[]{"geo.tiff", "no_crs_no_envelope.tif"};
       
        int i=0;
        for (String file : files){
            final File input = TestData.file(GeoTiffReaderTest.class, file);
            final AbstractGridFormat format = new GeoTiffFormat();
            assertTrue(format.accepts(input));
   
            // getting a reader
            GeoTiffReader reader = new GeoTiffReader(input);
   
            // reading the coverage
View Full Code Here

        out.close();
       
        FileUtils.deleteQuietly(zipFile);
       
        final URL emptyMosaicURL = TestData.url(this, "emptyMosaic");
        final AbstractGridFormat mosaicFormat = TestUtils.getFormat(emptyMosaicURL);
        ImageMosaicReader reader = TestUtils.getReader(emptyMosaicURL, mosaicFormat);

        String[] metadataNames = reader.getMetadataNames();
        assertNull(metadataNames);
View Full Code Here

     */
    @Test
    @SuppressWarnings("rawtypes")
    public void granuleSourceTest() throws Exception {
   
        final AbstractGridFormat format = TestUtils.getFormat(timeAdditionalDomainsRangeURL);
        ImageMosaicReader reader = TestUtils.getReader(timeAdditionalDomainsRangeURL, format);
   
        GranuleSource source = ((StructuredGridCoverage2DReader)reader).getGranules("time_domainsRanges", true);
        final int granules = source.getCount(null);
        final SimpleFeatureType type = source.getSchema();
View Full Code Here

     * dataset
     * @throws Exception
     */
    @Test
    public void testDimensionsDescriptor() throws Exception {
        final AbstractGridFormat format = TestUtils.getFormat(timeAdditionalDomainsRangeURL);
        ImageMosaicReader reader = TestUtils.getReader(timeAdditionalDomainsRangeURL, format);
        List<DimensionDescriptor> descriptors = ((StructuredGridCoverage2DReader)reader).getDimensionDescriptors("time_domainsRanges");
        assertNotNull(descriptors);
        assertEquals(4, descriptors.size());
       
View Full Code Here

     * Tests that selection by range works properly
     * @throws Exception
     */
    @Test
    public void timeTimeRangeSelection() throws Exception {
        final AbstractGridFormat format = TestUtils
                .getFormat(timeAdditionalDomainsRangeURL);
        ImageMosaicReader reader = TestUtils.getReader(timeAdditionalDomainsRangeURL, format);
   
        // specify a range that's below the available data
        GridCoverage2D coverage = readCoverageInDateRange(reader, "2008-10-20T00:00:00.000Z", "2008-10-25T12:00:00.000Z");
View Full Code Here

    @Test
    //@Ignore
    @SuppressWarnings("rawtypes")
    public void multipleDimensionsStacked() throws Exception {
   
        final AbstractGridFormat format = TestUtils.getFormat(timeAdditionalDomainsURL);
        ImageMosaicReader reader = TestUtils.getReader(timeAdditionalDomainsURL,format);
   
        final String[] metadataNames = reader.getMetadataNames();
        assertNotNull(metadataNames);
        assertEquals(metadataNames.length, 18);
View Full Code Here

     */
    @Test
    //@Ignore
    public void testHeterogeneousGranules() throws Exception {

        final AbstractGridFormat format = TestUtils.getFormat(heterogeneousGranulesURL);
        ImageMosaicReader reader = TestUtils.getReader(heterogeneousGranulesURL, format);

        final ParameterValue<GridGeometry2D> gg = AbstractGridFormat.READ_GRIDGEOMETRY2D.createValue();
        final GeneralEnvelope envelope = reader.getOriginalEnvelope();
        final Dimension dim = new Dimension();
View Full Code Here

      final String title,
      final boolean blend) throws Exception {

    // Get the resources as needed.
    Assert.assertNotNull(testURL);
    final AbstractGridFormat format = TestUtils.getFormat(testURL);
    final ImageMosaicReader reader = TestUtils.getReader(testURL, format);

    // limit yourself to reading just a bit of it
    final ParameterValue<Color> inTransp =  AbstractGridFormat.INPUT_TRANSPARENT_COLOR.createValue();
    inTransp.setValue(inputTransparent);
View Full Code Here

  private void imageMosaicCropTest(URL testURL, String title)
      throws Exception{

    // Get the resources as needed.
    Assert.assertNotNull(testURL);
    final AbstractGridFormat format = TestUtils.getFormat(testURL);
    final ImageMosaicReader reader = TestUtils.getReader(testURL, format);


    // crop
    final ParameterValue<GridGeometry2D> gg =  AbstractGridFormat.READ_GRIDGEOMETRY2D.createValue();
View Full Code Here

TOP

Related Classes of org.geotools.coverage.grid.io.AbstractGridFormat

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.