public int removeGranules(Filter filter) { return removeGranules(filter, new Hints()); }
/** * Returns the reader hints based on the current WCS configuration * * @param wcs */ public static Hints getReaderHints(WCSInfo wcs) { Hints hints = new Hints(); hints.add(new Hints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE)); if (wcs.getOverviewPolicy() == null) { hints.add(new Hints(Hints.OVERVIEW_POLICY, OverviewPolicy.IGNORE)); } else { hints.add(new Hints(Hints.OVERVIEW_POLICY, wcs.getOverviewPolicy())); } hints.put( Hints.DECIMATION_POLICY, wcs.isSubsamplingEnabled() ? DecimationPolicy.ALLOW : DecimationPolicy.DISALLOW); return hints; }
public GridCoverageReader getGridCoverageReader(ProgressListener listener, Hints hints) throws IOException { // manage projection policy if (this.projectionPolicy == ProjectionPolicy.FORCE_DECLARED) { final Hints crsHints = new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, this.getCRS()); if (hints != null) hints.putAll(crsHints); else hints = crsHints; } return catalog.getResourcePool().getGridCoverageReader(this, nativeCoverageName, hints); }
public GridCoverage getGridCoverage( ProgressListener listener, ReferencedEnvelope envelope, Hints hints) throws IOException { // manage projection policy if (this.projectionPolicy == ProjectionPolicy.FORCE_DECLARED) { final Hints crsHints = new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, this.getCRS()); if (hints != null) hints.putAll(crsHints); else hints = crsHints; } return catalog.getResourcePool().getGridCoverage(this, envelope, hints); }
public GridCoverage getGridCoverage(ProgressListener listener, Hints hints) throws IOException { // manage projection policy if (this.projectionPolicy == ProjectionPolicy.FORCE_DECLARED) { final Hints crsHints = new Hints(Hints.DEFAULT_COORDINATE_REFERENCE_SYSTEM, this.getCRS()); if (hints != null) hints.putAll(crsHints); else hints = crsHints; } return catalog.getResourcePool().getGridCoverage(this, null, hints); }
/** * Get hints that have been set to control the query execution. * * @return hints that are set (may be empty) * @see #setHints(Hints) setHints(Hints) for more explanation */ public Hints getHints() { if (hints == null) { hints = new Hints(); } return hints; }
/** * Creates a new instance of GeoTiffReader * * @param input the GeoTiff file * @throws DataSourceException */ public GeoTiffReader(Object input) throws DataSourceException { this(input, new Hints(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.TRUE)); }
/** Returns a default common factory instance. */ public static synchronized BasicFactories getDefault() { if (DEFAULT == null) { DEFAULT = new BasicFactories(new Hints(Hints.LENIENT_DATUM_SHIFT, Boolean.TRUE)); } return DEFAULT; }
GridCoverageReader returnedReader2 = pool.getGridCoverageReader( storeInfo, new Hints(Hints.KEY_ANTIALIASING, Hints.VALUE_ANTIALIAS_ON)); assertThat(reader, equalTo(returnedReader2)); final Hints hints2 = capturedHints.getValue();
query.setMaxFeatures(maxEntries); query.setPropertyNames(new String[] {descriptor.getStartAttribute()}); query.setHints(new Hints(StructuredCoverageViewReader.QUERY_FIRST_BAND, true));
/** * Returns the hints to be used for lazy creation of <em>default</em> factories in various * {@code getFoo} methods. This is different from {@link #getImplementationHints} because the * later may returns non-default factories. */ private Hints hints() { final Hints completed = new Hints(hints); setHintsInto(completed); return completed; }
/** Returns a factory of the given type. */ private static final <T extends AbstractAuthorityFactory> T getFactory(final Class<T> type) { return type.cast( ReferencingFactoryFinder.getCRSAuthorityFactory( "EPSG", new Hints(Hints.CRS_AUTHORITY_FACTORY, type))); }
Number safeConvertToNumber(Expression expression, Class target) { return (Number) Converters.convert( expression.evaluate(null), target, new Hints(ConverterFactory.SAFE_CONVERSION, true)); }
/** * Returns a factory from the specified hints. Used by {@link URN_AuthorityFactory} constructor * as well. */ static AllAuthoritiesFactory getFactory(Hints hints, final String authority) { if (!defaultAxisOrderHints(hints, authority)) { hints = new Hints(hints); hints.put(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER, Boolean.FALSE); } return new AllAuthoritiesFactory(hints); }
/** Returns the {@linkplain #hints hints} extented will all hints specified in dependencies. */ private Hints hints() { final Hints extended = new Hints(hints); addAll(operationFactory, extended); addAll(datumFactory, extended); addAll(csFactory, extended); addAll(crsFactory, extended); extended.putAll(hints); // Gives precedence to the hints from this class. return extended; }
/** Gets the authority factory for ESRI. */ @Before public void setUp() { factory = (FactoryUsingWKT) ReferencingFactoryFinder.getCRSAuthorityFactory( "EPSG", new Hints(Hints.CRS_AUTHORITY_FACTORY, FactoryUsingWKT.class)); }
public void testGetValidatingFeatureFactory() { Hints hints = new Hints(Hints.FEATURE_FACTORY, ValidatingFeatureFactoryImpl.class); FeatureFactory featureFactory = CommonFactoryFinder.getFeatureFactory(hints); assertNotNull(featureFactory); assertTrue(featureFactory instanceof ValidatingFeatureFactoryImpl); } }
public void testMixQueryAll() { // mixing Query.ALL equivalents with extra hints did not work Query firstQuery = new Query(Query.ALL); Query secondQuery = new Query(Query.ALL); firstQuery.setHints(new Hints(Hints.USE_PROVIDED_FID, Boolean.TRUE)); secondQuery.setHints(new Hints(Hints.FEATURE_2D, Boolean.TRUE)); Query mixed = DataUtilities.mixQueries(firstQuery, secondQuery, "mixer"); assertEquals(2, mixed.getHints().size()); assertTrue((Boolean) mixed.getHints().get(Hints.USE_PROVIDED_FID)); assertTrue((Boolean) mixed.getHints().get(Hints.FEATURE_2D)); }