/** * Hints constructor for FactoryRegistry */ public JTSAggregateFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
static SimpleFeatureReader getDelegateReader(SimpleFeatureReader reader, Query query) throws IOException { Hints hints = query.getHints(); int maxFeatures = 1000; if (hints != null && hints.get(Hints.MAX_MEMORY_SORT) != null) { maxFeatures = (Integer) hints.get(Hints.MAX_MEMORY_SORT); } else if (Hints.getSystemDefault(Hints.MAX_MEMORY_SORT) != null) { maxFeatures = (Integer) Hints.getSystemDefault(Hints.MAX_MEMORY_SORT); } return getDelegateReader(reader, query.getSortBy(), maxFeatures); }
/** * Hints constructor for FactoryRegistry */ public JTSGeometryFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
/** * Hints constructor for FactoryRegistry */ public JTSGeometryFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
/** * Hints constructor for FactoryRegistry */ public JTSComplexFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
/** * Returns a rendering hint. * * @param key The hint key (e.g. {@link Hints#JAI_INSTANCE}). * @return The hint value for the specified key, or {@code null} if there is no hint for the * specified key. */ public final Object getRenderingHint(final RenderingHints.Key key) { return hints.get(key); }
/** * Returns a rendering hint. * * @param key The hint key (e.g. {@link Hints#JAI_INSTANCE}). * @return The hint value for the specified key, or {@code null} if there is no hint for the * specified key. */ public final Object getRenderingHint(final RenderingHints.Key key) { return hints.get(key); }
/** * Hints constructor for FactoryRegistry */ public JTSComplexFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
public void setHints(Hints hints) { if (hints != null) { this.simplificationDistance = (Number) hints.get(Hints.GEOMETRY_DISTANCE); } this.hints = hints; }
/** * Hints constructor for FactoryRegistry */ public JTSAggregateFactory( Hints hints ){ this( (CoordinateReferenceSystem) hints.get( Hints.CRS ) ); } /**
/** * Extracts the SRID from the hints, or returns {@code 0} if none. */ private static int getSRID(final Hints hints) { if (hints != null) { final Integer SRID = (Integer) hints.get(Hints.JTS_SRID); if (SRID != null) { return SRID.intValue(); } } return 0; }
/** * Extracts the SRID from the hints, or returns {@code 0} if none. */ private static int getSRID(final Hints hints) { if (hints != null) { final Integer SRID = (Integer) hints.get(Hints.JTS_SRID); if (SRID != null) { return SRID.intValue(); } } return 0; }
private GeometryFactory findGeometryFactory(Hints hints) { GeometryFactory geomFactory = (GeometryFactory) hints.get(Hints.JTS_GEOMETRY_FACTORY); if (geomFactory == null) { CoordinateSequenceFactory seqFac; seqFac = (CoordinateSequenceFactory) hints.get(Hints.JTS_COORDINATE_SEQUENCE_FACTORY); if (seqFac == null) { seqFac = PackedCoordinateSequenceFactory.DOUBLE_FACTORY; } geomFactory = new GeometryFactory(seqFac); } return geomFactory; }
/** * Gets the JAI instance to use from the rendering hints. */ private static JAI getJAI(final Hints hints) { if (hints != null) { final Object property = hints.get(Hints.JAI_INSTANCE); if (property instanceof JAI) { return (JAI) property; } } return JAI.getDefaultInstance(); }
private Double getRequestedDistance(Query query) { Double result = (Double) query.getHints().get(Hints.GEOMETRY_DISTANCE); if (result == null) { log.warning("No hint for geometry distance in query, fallback to base feature" ); } else { log.info("Hint geometry distance: "+result); } return result; }
protected static boolean isGeotoolsLongitudeFirstAxisOrderForced() { return Boolean.getBoolean(GeoTools.FORCE_LONGITUDE_FIRST_AXIS_ORDER) || GeoTools.getDefaultHints().get(Hints.FORCE_LONGITUDE_FIRST_AXIS_ORDER) == Boolean.TRUE; } /** Sets BBOX and SRS using the provided Envelope. */
public Map<String, String> getVendorParameter() { if(query.getHints() != null) { return (Map<String, String>) query.getHints().get(WFSDataStore.WFS_VENDOR_PARAMETERS); } else { return null; } }
/** * Utility method used to produce cache based on provide Hint */ public static ObjectCache create( Hints hints ) throws FactoryRegistryException { if( hints == null ) hints = GeoTools.getDefaultHints(); String policy = (String) hints.get(Hints.CACHE_POLICY); int limit = Hints.CACHE_LIMIT.toValue(hints); return create( policy, limit ); } /**
protected void encodeGeometryColumn(GeometryDescriptor gatt, String prefix, StringBuffer sql,Hints hints) { int srid = getDescriptorSRID(gatt); if (isGeneralizationRequired(hints, gatt)==true) { Double distance = (Double) hints.get(Hints.GEOMETRY_GENERALIZATION); dialect.encodeGeometryColumnGeneralized(gatt, prefix, srid,sql,distance); return; } if (isSimplificationRequired(hints, gatt)==true) { Double distance = (Double) hints.get(Hints.GEOMETRY_SIMPLIFICATION); dialect.encodeGeometryColumnSimplified(gatt, prefix, srid, sql,distance); return; } dialect.encodeGeometryColumn(gatt,prefix,srid, hints, sql); }
private ReferencedEnvelope getEnvelope(final Query query) throws TransformException, FactoryException { if (query.getHints().containsKey(SubsampleProcess.OUTPUT_BBOX)) { return ((ReferencedEnvelope) query.getHints().get(SubsampleProcess.OUTPUT_BBOX)).transform( reader.getFeatureType().getCoordinateReferenceSystem(), true); } return null; }