private void checkGetFeatureInfo( Version version, org.deegree.protocol.wms.ops.GetFeatureInfo gfi ) throws OWSException { if ( gfi.getInfoFormat() != null && !gfi.getInfoFormat().equals( "" ) && !featureInfoManager.getSupportedFormats().contains( gfi.getInfoFormat() ) ) { throw new OWSException( get( "WMS.INVALID_INFO_FORMAT", gfi.getInfoFormat() ), OWSException.INVALID_FORMAT ); } for ( LayerRef lr : gfi.getQueryLayers() ) { if ( !service.hasTheme( lr.getName() ) ) { throw new OWSException( "The layer with name " + lr.getName() + " is not defined.", "LayerNotDefined", "layers" ); } } for ( StyleRef sr : gfi.getStyles() ) { // TODO check style availability } try { if ( gfi.getCoordinateSystem() == null ) { // this can happen if some AUTO SRS id was invalid controllers.get( version ).throwSRSException( "automatic" ); } ICRS crs = gfi.getCoordinateSystem(); if ( crs instanceof CRSRef ) { ( (CRSRef) crs ).getReferencedObject(); } } catch ( ReferenceResolvingException e ) { // only throw an exception if a truly invalid srs is found // this makes it possible to request srs that are not advertised, which may be useful controllers.get( version ).throwSRSException( gfi.getCoordinateSystem().getAlias() ); } }
params.put( "x", Integer.toString( gfi.getX() ) ); params.put( "y", Integer.toString( gfi.getY() ) ); params.put( "srs", gfi.getCoordinateSystem().getAlias() ); String fmt = "text/xml"; LinkedList<String> fmts = getFormats(WMSRequestType.GetFeatureInfo); params.put( "i", Integer.toString( gfi.getX() ) ); params.put( "j", Integer.toString( gfi.getY() ) ); params.put( "crs", gfi.getCoordinateSystem().getAlias() ); String fmt = "text/xml"; LinkedList<String> fmts = getFormats(WMSRequestType.GetFeatureInfo);
List<LayerData> list = new ArrayList<LayerData>(); double scale = calcScaleWMS130( gfi.getWidth(), gfi.getHeight(), gfi.getEnvelope(), gfi.getCoordinateSystem(), DEFAULT_PIXEL_SIZE );
throws OWSException, IOException { checkGetFeatureInfo( version, fi ); ICRS crs = fi.getCoordinateSystem(); boolean geometries = fi.returnGeometries(); List<String> queryLayers = map( fi.getQueryLayers(), CollectionUtils.<LayerRef> getToStringMapper() );