Examples of Hints


Examples of org.geotools.factory.Hints

    static String[] codes;
    Hints hints;
   
    protected void connect() throws Exception {
        super.connect();
        hints = new Hints(Hints.CACHE_POLICY, "none");    
        hints.put(Hints.AUTHORITY_MAX_ACTIVE, new Integer(MAX_WORKERS));
        if (datasource == null) {
            fail("no datasource available");
        }
        mediator = new OracleDialectEpsgMediator(80, hints, datasource);
View Full Code Here

Examples of org.geotools.factory.Hints

public class FactoryUsingOracleSQLOnlineTest extends OracleOnlineTestCase {

    public void testDatumCreation() throws Exception {
        Connection connection = datasource.getConnection();
        try{
            Hints hints = new Hints(Hints.EPSG_DATA_SOURCE, "jdbc/EPSG");
       
            OracleDialectEpsgFactory oracle = new OracleDialectEpsgFactory(hints, connection);
   
            GeodeticDatum datum = oracle.createGeodeticDatum("6326");
            assertNotNull(datum);
View Full Code Here

Examples of org.geotools.factory.Hints

    }
   
    public void testCRSCreation() throws Exception {
        Connection connection = datasource.getConnection();
        try{
            Hints hints = new Hints(Hints.EPSG_DATA_SOURCE, "jdbc/EPSG");
            OracleDialectEpsgFactory oracle = new OracleDialectEpsgFactory(hints, connection );
           
            CoordinateReferenceSystem crs = oracle.createCoordinateReferenceSystem("4326");
            assertNotNull(crs);
        }
View Full Code Here

Examples of org.geotools.factory.Hints

        } else {
            bgValues = null;
        }
        try {
            return Resampler2D.reproject(source, targetCRS, targetGG, interpolation,
                (hints instanceof Hints) ? hints : new Hints(hints), bgValues);
        } catch (FactoryException exception) {
            throw new CannotReprojectException(Errors.format(
                    ErrorKeys.CANT_REPROJECT_$1, source.getName()), exception);
        } catch (TransformException exception) {
            throw new CannotReprojectException(Errors.format(
View Full Code Here

Examples of org.geotools.factory.Hints

     * Makes sure the datastore works when the renderer uses the typical rendering hints
     * @throws Exception
     */
    public void testRendererBehaviour() throws Exception {
        Query query = new Query(featureSource.getSchema().getTypeName());
        query.setHints(new Hints(new Hints(Hints.JTS_COORDINATE_SEQUENCE_FACTORY, new LiteCoordinateSequenceFactory())));
        FeatureCollection fc = featureSource.getFeatures(query);
        FeatureIterator fi = fc.features();
        while(fi.hasNext()) {
            fi.next();
        }
View Full Code Here

Examples of org.geotools.factory.Hints

        Query query = new Query();
        query.setFilter(filter);

        // check we're respecting the geometry factory hint
        GeometryFactory gf1 = new GeometryFactory();
        query.setHints(new Hints(Hints.JTS_GEOMETRY_FACTORY, gf1));
        SimpleFeature f1 = getFirstFeature(featureSource.getFeatures(query));
        assertSame(gf1, ((Geometry) f1.getDefaultGeometry()).getFactory());
       
        // check we're respecting the geometry factory when changing it
        GeometryFactory gf2 = new GeometryFactory();
        query.setHints(new Hints(Hints.JTS_GEOMETRY_FACTORY, gf2));
        SimpleFeature f2 = getFirstFeature(featureSource.getFeatures(query));
        assertSame(gf2, ((Geometry) f2.getDefaultGeometry()).getFactory());

    }
View Full Code Here

Examples of org.geotools.factory.Hints

          final AbstractGridFormat format = new GeoTiffFormat();
          assertTrue(format.accepts(noCrs));

          // hint for CRS
          final CoordinateReferenceSystem crs = CRS.decode("EPSG:32632", true);
          final Hints hint = new Hints();
          hint.put(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, crs);

          // getting a reader
          GeoTiffReader reader = new GeoTiffReader(noCrs, hint);

          // reading the coverage
View Full Code Here

Examples of org.geotools.factory.Hints

        assertTrue(mosaic.mkdirs());
       
        File file = TestData.file(this, "O3-NO2.nc");
        FileUtils.copyFileToDirectory(file, mosaic);
        file = new File(mosaic, "O3-NO2.nc");
        final Hints hints= new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, CRS.decode("EPSG:4326", true));
        // Get format
        final AbstractGridFormat format = (AbstractGridFormat) GridFormatFinder.findFormat(file.toURI().toURL(),hints);
        final NetCDFReader reader = (NetCDFReader) format.getReader(file.toURI().toURL(), hints);
       
        assertNotNull(format);
View Full Code Here

Examples of org.geotools.factory.Hints

       
        File file = TestData.file(this, "O3-NO2.nc");
        FileUtils.copyFileToDirectory(file, mosaic);
        file = new File(mosaic, "O3-NO2.nc");
       
        final Hints hints= new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, CRS.decode("EPSG:4326", true));
        // Get format
        final AbstractGridFormat format = (AbstractGridFormat) GridFormatFinder.findFormat(file.toURI().toURL(),hints);
        final NetCDFReader reader = (NetCDFReader) format.getReader(file.toURI().toURL(), hints);
       
        assertNotNull(format);
View Full Code Here

Examples of org.geotools.factory.Hints

       
        File file = TestData.file(this, "O3-NO2-noZ.nc");
        FileUtils.copyFileToDirectory(file, mosaic);
        file = new File(mosaic, "O3-NO2-noZ.nc");
       
        final Hints hints= new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, CRS.decode("EPSG:4326", true));
        // Get format
        final AbstractGridFormat format = (AbstractGridFormat) GridFormatFinder.findFormat(file.toURI().toURL(),hints);
        final NetCDFReader reader = (NetCDFReader) format.getReader(file.toURI().toURL(), hints);
       
        assertNotNull(format);
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.