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 double getScale() { return calcScaleWMS130( width, height, envelope, envelope.getCoordinateSystem(), pixelSize ); }
public GetFeatureInfo( List<LayerRef> layers, List<StyleRef> styles, List<String> queryLayers, int width, int height, int x, int y, Envelope envelope, ICRS crs, int featureCount, String infoFormat, HashMap<String, String> parameterMap, Map<String, List<?>> dimensions ) throws OWSException { this.layers.addAll( layers ); this.styles.addAll( styles ); cleanUpLayers( queryLayers ); this.width = width; this.height = height; this.x = x; this.y = y; this.bbox = envelope; this.crs = crs; this.featureCount = featureCount; this.infoFormat = infoFormat; this.dimensions.putAll( dimensions ); this.parameterMap.putAll( parameterMap ); this.scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, DEFAULT_PIXEL_SIZE ); }
public LayerQuery( Envelope envelope, int width, int height, int x, int y, int featureCount, OperatorFilter filter, StyleRef style, Map<String, String> parameters, Map<String, List<?>> dimensions, MapOptionsMaps options, Envelope queryBox, int layerRadius ) { this.envelope = envelope; this.width = width; this.height = height; this.x = x; this.y = y; this.featureCount = featureCount; this.filter = filter; this.style = style; this.parameters = parameters; this.dimensions = dimensions; this.options = options; this.queryBox = queryBox; this.layerRadius = layerRadius; this.scale = RenderHelper.calcScaleWMS130( width, height, envelope, envelope.getCoordinateSystem(), DEFAULT_PIXEL_SIZE ); this.resolution = Utils.calcResolution( envelope, width, height ); }
/** * @param envelope * @param width * @param height * @param style * @param filters * @param parameters * @param dimensions * @param pixelSize * must be in meter, not mm * @param options * @param layerRadius */ public LayerQuery( Envelope envelope, int width, int height, StyleRef style, OperatorFilter filter, Map<String, String> parameters, Map<String, List<?>> dimensions, double pixelSize, MapOptionsMaps options, Envelope queryBox ) { this.envelope = envelope; this.width = width; this.height = height; this.style = style; this.filter = filter; this.parameters = parameters; this.dimensions = dimensions; this.options = options; this.queryBox = queryBox; this.scale = RenderHelper.calcScaleWMS130( width, height, envelope, envelope.getCoordinateSystem(), pixelSize ); this.resolution = Utils.calcResolution( envelope, width, height ); }
handleVSPs( new HashMap<String, String>(), exts ); try { scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, pixelSize ); LOG.debug( "GetMap request has a WMS 1.3.0/SLD scale of '{}' (adapted to pixel size of {}).", scale, pixelSize );
/** * @param map * @param version * @param service * @throws OWSException */ public GetFeatureInfo( Map<String, String> map, Version version ) throws OWSException { if ( version.equals( VERSION_111 ) ) { parse111( map ); } if ( version.equals( VERSION_130 ) ) { parse130( map ); } parameterMap.putAll( map ); scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, DEFAULT_PIXEL_SIZE ); }
public GetMap( List<Pair<String, String>> layers, int width, int height, Envelope boundingBox, String format, boolean transparent ) throws OWSException { for ( Pair<String, String> layer : layers ) { this.layers.add( new LayerRef( layer.first ) ); this.styles.add( layer.second != null ? new StyleRef( layer.second ) : null ); } this.width = width; this.height = height; this.bbox = boundingBox; this.crs = boundingBox.getCoordinateSystem(); this.bgcolor = white; this.format = format; this.transparent = transparent; try { scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, pixelSize ); LOG.debug( "GetMap request has a WMS 1.3.0/SLD scale of '{}' (adapted to pixel size of {}).", scale, pixelSize ); resolution = max( bbox.getSpan0() / width, bbox.getSpan1() / height ); LOG.debug( "Resolution per pixel is {}.", resolution ); } catch ( ReferenceResolvingException e ) { LOG.trace( "Stack trace:", e ); throw new OWSException( e.getLocalizedMessage(), "InvalidParameterValue" ); } }
/** * @param map * @param version * @param service * @throws OWSException */ public GetMap( Map<String, String> map, Version version, MapOptionsMaps exts ) throws OWSException { if ( version.equals( VERSION_111 ) ) { parse111( map, exts ); } if ( version.equals( VERSION_130 ) ) { parse130( map, exts ); } parameterMap.putAll( map ); try { scale = RenderHelper.calcScaleWMS130( width, height, bbox, crs, pixelSize ); LOG.debug( "GetMap request has a WMS 1.3.0/SLD scale of '{}' (adapted to pixel size of {}).", scale, pixelSize ); resolution = max( bbox.getSpan0() / width, bbox.getSpan1() / height ); LOG.debug( "Resolution per pixel is {}.", resolution ); } catch ( ReferenceResolvingException e ) { LOG.trace( "Stack trace:", e ); LOG.warn( "The scale of a GetMap request could not be calculated: '{}'.", e.getLocalizedMessage() ); } }
List<LayerData> list = new ArrayList<LayerData>(); double scale = calcScaleWMS130( gfi.getWidth(), gfi.getHeight(), gfi.getEnvelope(), gfi.getCoordinateSystem(), DEFAULT_PIXEL_SIZE );