public GetMap( List<String> layers, List<String> styles, int width, int height, Envelope envelope, ICRS crs, String format, boolean transparent, Map<String, String> overriddenParameters ) { this( layers, width, height, envelope, crs, format, transparent ); this.overriddenParameters = overriddenParameters; this.styles = map( styles, StyleRef.FROM_NAMES ); }
public GetMap( List<String> layers, int width, int height, Envelope envelope, ICRS crs, String format, boolean transparent ) { this.layers = map( layers, FROM_NAMES ); this.width = width; this.height = height; this.bbox = envelope; this.crs = crs; this.format = format; this.transparent = transparent; }
public GetFeatureInfo( List<String> layers, int width, int height, int x, int y, Envelope envelope, ICRS crs, int featureCount ) { this.layers.addAll( map( layers, FROM_NAMES ) ); this.width = width; this.height = height; this.x = x; this.y = y; this.bbox = envelope; this.crs = crs; this.featureCount = featureCount; scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, DEFAULT_PIXEL_SIZE ); }
public static Description fromJaxb( List<LanguageStringType> titles, List<LanguageStringType> abstracts, List<KeywordsType> keywords ) { Description desc = new Description( null, null, null, null ); if ( titles != null ) { desc.setTitles( map( titles, LANG_LANG_MAPPER ) ); } if ( abstracts != null ) { desc.setAbstracts( map( abstracts, LANG_LANG_MAPPER ) ); } if ( keywords != null ) { desc.setKeywords( map( keywords, KW_MAPPER ) ); } return desc; }
/** * @param si * @return null, if si is null */ public static ServiceIdentification convertFromJAXB( ServiceIdentificationType si ) { if ( si == null ) { return null; } List<Pair<List<LanguageString>, CodeType>> keywords = null; if ( si.getKeywords() != null ) { keywords = map( si.getKeywords(), KW_MAPPER ); } List<LanguageString> titles = map( si.getTitle(), LANG_MAPPER ); List<LanguageString> abstracts = map( si.getAbstract(), LANG_MAPPER ); String fees = si.getFees(); List<String> accessConstraints = si.getAccessConstraints(); return new ServiceIdentification( null, titles, abstracts, keywords, null, null, null, fees, accessConstraints ); }
throw new OWSException( "The LAYERS parameter is missing.", OWSException.MISSING_PARAMETER_VALUE ); layers = ls == null ? new LinkedList<LayerRef>() : CollectionUtils.map( ls.split( "," ), LayerRef.FROM_NAMES );
@Override public Pair<List<LanguageString>, CodeType> apply( KeywordsType u ) { return new Pair<List<LanguageString>, CodeType>( map( u.getKeyword(), LANG_LANG_MAPPER ), CODETYPE_MAPPER.apply( u.getType() ) ); } };
this.layers = ls == null ? new LinkedList<LayerRef>() : new LinkedList<LayerRef>( map( ls.split( "," ), FROM_NAMES ) ); if ( layers.size() == 1 && layers.get( 0 ).getName().isEmpty() ) {
@Override public Pair<List<LanguageString>, CodeType> apply( KeywordsType u ) { Pair<List<LanguageString>, CodeType> p = new Pair<List<LanguageString>, CodeType>(); p.first = map( u.getKeyword(), LANG_LANG_MAPPER ); if ( u.getType() != null ) { p.second = CODE_TYPE_MAPPER.apply( u.getType() ); } return p; } };
Mapper<Boolean, Styling> lineStylingMapper = CollectionUtils.<Styling> getInstanceofMapper( LineStyling.class ); boolean isPoint = ruleType.equals( Point.class ) || reduce( true, map( stylings, pointStylingMapper ), AND ); boolean isLine = ruleType.equals( LineString.class ) || reduce( true, map( stylings, lineStylingMapper ), AND );
List<Query> buildMapQueries() { List<Query> queries = new ArrayList<Query>(); Integer maxFeats = query.getRenderingOptions().getMaxFeatures( layerName ); final int maxFeatures = maxFeats == null ? -1 : maxFeats; if ( ftName == null && featureStore != null ) { final Filter filter2 = filter; queries.addAll( map( featureStore.getSchema().getFeatureTypes( null, false, false ), new Mapper<Query, FeatureType>() { @Override public Query apply( FeatureType u ) { Filter fil = addBBoxConstraint( bbox, filter2, geomProp, true ); return createQuery( u.getName(), fil, round( query.getScale() ), maxFeatures, query.getResolution(), sortBy ); } } ) ); } else { Query fquery = createQuery( ftName, addBBoxConstraint( bbox, filter, geomProp, true ), round( query.getScale() ), maxFeatures, query.getResolution(), sortBy ); queries.add( fquery ); } return queries; }
List<Query> buildInfoQueries() { List<Query> queries = new ArrayList<Query>(); if ( ftName == null ) { queries.addAll( map( featureStore.getSchema().getFeatureTypes( null, false, false ), new Mapper<Query, FeatureType>() { @Override public Query apply( FeatureType u ) { Filter f; if ( filter == null ) { f = buildFilter( null, u, bbox ); } else { f = buildFilter( ( (OperatorFilter) filter ).getOperator(), u, bbox ); } return createQuery( u.getName(), f, -1, query.getFeatureCount(), -1, sortBy ); } } ) ); clearNulls( queries ); } else { Filter f; if ( filter == null ) { f = buildFilter( null, featureStore.getSchema().getFeatureType( ftName ), bbox ); } else { f = buildFilter( ( (OperatorFilter) filter ).getOperator(), featureStore.getSchema().getFeatureType( ftName ), bbox ); } queries.add( createQuery( ftName, f, -1, query.getFeatureCount(), -1, sortBy ) ); } return queries; }
@Override public FeatureStore build() { String connId = config.getConnectionPoolId(); if ( connId == null ) { connId = config.getJDBCConnId(); } String srs = config.getStorageCRS(); String stmt = config.getSQLStatement(); String name = config.getFeatureTypeName(); String ns = config.getFeatureTypeNamespace(); String prefix = config.getFeatureTypePrefix(); String bbox = config.getBBoxStatement(); LinkedList<Pair<Integer, String>> lods = map( config.getLODStatement(), lodMapper ); ConnectionProvider prov = workspace.getResource( ConnectionProviderProvider.class, connId ); return new SimpleSQLFeatureStore( prov, srs, stmt, name, ns, prefix, bbox, lods, metadata ); }
ICRS crs = fi.getCoordinateSystem(); boolean geometries = fi.returnGeometries(); List<String> queryLayers = map( fi.getQueryLayers(), CollectionUtils.<LayerRef> getToStringMapper() );