Package org.geotools.factory

Examples of org.geotools.factory.Hints


    //
    // Get a reader
    //
    final ImagePyramidReader reader = new ImagePyramidReader(
        testFile,
        new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
    assertNotNull(reader);

    //
    // alpha on output
    //
View Full Code Here


    public void testRequestOutsideBounds() throws IOException, MismatchedDimensionException,
            NoSuchAuthorityCodeException {
        // grab the reader
        final URL testFile = TestData.getResource(this, "goodpyramid/"+TEST_FILE);
        assertNotNull(testFile);
        final ImagePyramidReader reader = new ImagePyramidReader(testFile, new Hints(
                Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
        assertNotNull(reader);
       
        // prepare a request that crosses the bounds for a really minimal part
        GeneralEnvelope ge = reader.getOriginalEnvelope();
View Full Code Here

    @Test
    public void badPyramid1() throws IOException {
        final URL sourceDir = TestData.getResource(this, "badpyramid1");
        // now make sure we can actually rebuild the mosaic
        final AbstractGridFormat format = new ImagePyramidFormat();
        final Hints hints = new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, DefaultGeographicCRS.WGS84);
        assertFalse(((ImagePyramidFormat)format).accepts(sourceDir, hints));
        final ImagePyramidReader reader = (ImagePyramidReader) format.getReader(sourceDir, hints);
        assertNull(reader);
    }
View Full Code Here

    @Test
    public void badPyramid2() throws IOException {
        final URL sourceDir = TestData.getResource(this, "badpyramid2");
        // now make sure we can actually rebuild the mosaic
        final AbstractGridFormat format = new ImagePyramidFormat();
        final Hints hints = new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, DefaultGeographicCRS.WGS84);
        assertFalse(((ImagePyramidFormat)format).accepts(sourceDir, hints));
        final ImagePyramidReader reader = (ImagePyramidReader) format.getReader(sourceDir, hints);
        assertNull(reader);
    }
View Full Code Here

    //
    // Get the reader
    //
    final ImagePyramidReader reader = new ImagePyramidReader(
        testFile,
        new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE));
    assertNotNull(reader);
   
    assertEquals("true", reader.getMetadataValue("HAS_TIME_DOMAIN"));
    final String timeMetadata = reader.getMetadataValue("TIME_DOMAIN");
    assertNotNull(timeMetadata);
View Full Code Here

    public boolean isAvailable() {
        return true;
    }

    public TestDriver() {
        super(TEST_DRIVER, TEST_DRIVER, TEST_DRIVER, new Hints(), Collections
                .singletonList(EXTENSION), EnumSet.of(DriverCapabilities.CONNECT,
                DriverCapabilities.CREATE, DriverCapabilities.DELETE));
    }
View Full Code Here

    this.imageIndex = imageIndex;
    this.cropBBox = cropBBox;
    this.mosaicWorldToGrid = mosaicWorldToGrid;
    this.granuleDescriptor = granuleDescriptor;
    this.request=request;
    this.hints = new Hints(hints);
    if (request.getTileDimensions()!= null) {
        final Dimension tileDimension = request.getTileDimensions();
        if (hints != null && hints.containsKey(JAI.KEY_IMAGE_LAYOUT)){
            final Object layout = this.hints.get(JAI.KEY_IMAGE_LAYOUT);
            if (layout != null && layout instanceof ImageLayout){
View Full Code Here

            // In case we are asked to use certain tile dimensions we tile
            // also at this stage in case the read type is Direct since
            // buffered images comes up untiled and this can affect the
            // performances of the subsequent affine operation.
            //
            final Hints localHints = new Hints(hints);
            if (hints != null && !hints.containsKey(JAI.KEY_BORDER_EXTENDER)) {
                final Object extender = hints.get(JAI.KEY_BORDER_EXTENDER);
                if (!(extender != null && extender instanceof BorderExtender)) {
                    localHints.add(ImageUtilities.EXTEND_BORDER_BY_COPYING);
                }
            }

            ImageWorker iw = new ImageWorker(image);
            iw.setRenderingHints(localHints);
View Full Code Here

            initReaderFromDescriptor((ImageMosaicDescriptor) source, uHints);
        } else {
            try {
               
             // Cloning the hints
                Hints localHints = new Hints(uHints);
                if (localHints != null) {
                    localHints.add(new Hints(Utils.MOSAIC_READER, this));
                }
                initReaderFromURL(source, localHints);
            } catch (Exception e) {
                throw new DataSourceException(e);
            }
View Full Code Here

    public static void setup() throws MalformedURLException {
        emptyMap = Collections.emptyMap();
        connectionParams = new HashMap<String, Serializable>();
        url = new URL(TestDriver.TEST_URL);
        connectionParams.put(DefaultFileDriver.URL.key, url);
        hints = new Hints();
        name = new NameImpl("test");
    }
View Full Code Here

TOP

Related Classes of org.geotools.factory.Hints

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.