@Override public int hashCode() { try { if ( getReferencedObject() != null ) { return getReferencedObject().hashCode(); } } catch ( ReferenceResolvingException e ) { LOG.debug( "CRSResource reference could not be resolved: {}", e.getLocalizedMessage() ); } return getURI().hashCode(); } }
@Override public boolean equals( Object obj ) { try { if ( getReferencedObject() != null ) { return getReferencedObject().equals( obj ); } } catch ( ReferenceResolvingException e ) { LOG.debug( "CRS reference could not be resolved: {}", e.getLocalizedMessage() ); } return getURI().equals( obj ); }
@Override public int hashCode() { try { if ( getReferencedObject() != null ) { return getReferencedObject().hashCode(); } } catch ( ReferenceResolvingException e ) { LOG.debug( "CRS reference could not be resolved: {}", e.getLocalizedMessage() ); } return getURI().hashCode(); }
} catch ( ReferenceResolvingException e ) { transformer = null; LOG.debug( "CRS could not be resolved: {}", e.getLocalizedMessage() );
} catch ( ReferenceResolvingException e ) { LOG.trace( "Stack trace:", e ); throw new OWSException( e.getLocalizedMessage(), "InvalidParameterValue" );
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() ); } }
@Override public boolean equals( java.lang.Object obj ) { if ( this == obj ) return true; if ( obj == null ) return false; T referencedObject = getReferencedObject(); try { if ( referencedObject != null ) { return referencedObject.equals( obj ); } } catch ( ReferenceResolvingException e ) { LOG.debug( "CRSResource reference could not be resolved: {}", e.getLocalizedMessage() ); } if ( obj instanceof Reference<?> ) { Reference<?> other = (Reference<?>) obj; if ( getURI() == null ) { if ( other.getURI() != null ) return false; } else if ( !getURI().equals( other.getURI() ) ) return false; } return getURI().equals( obj ); }
e.getLocalizedMessage() ); LOG.debug( "Could not resolve properties when calculating envelope: {}", e.getLocalizedMessage() );