Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] question to boundingbox handling and to internal exceptions

If I remove all layers from a map and add some others, the boundingbox changes. In my case it is set to the maximum (-180;180;-90;90). Why does this happen? And how can I avoid this? My hack is to save the map.getViewportModel().getBounds() Envelope, clear all Layers, add the other ones and then I set the boundingbox with SetViewportBBoxCommand. Since some layers belong to a wms, two requests are send to the server.
 
 
Another question:
 
If a wms server has an internal error one gets a http 500 response. In this case udig dumps a stacktrace to stderr:
!ENTRY net.refractions.udig.project 2 0 2007-06-08 14:13:23.609
!MESSAGE Server returned HTTP response code: 500 for URL: http://......
!STACK 0
net.refractions.udig.project.render.RenderException: Server returned HTTP response code: 500 for URL: http://..... at net.refractions.udig.render.internal.wms.basic.BasicWMSRenderer2.wrapException(BasicWMSRenderer2.java:820)
 at net.refractions.udig.render.internal.wms.basic.BasicWMSRenderer2$3.run(BasicWMSRenderer2.java:444)
Caused by: java.io.IOException: Server returned HTTP response code: 500 for URL: http://...
 at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1149)
 at org.geotools.data.ows.AbstractOpenWebService.internalIssueRequest(AbstractOpenWebService.java:363)
 at org.geotools.data.wms.WebMapServer.issueRequest(WebMapServer.java:95)
 at net.refractions.udig.catalog.internal.wms.WMSServiceImpl$CustomWMS.issueRequest(WMSServiceImpl.java:363)
 at net.refractions.udig.render.internal.wms.basic.BasicWMSRenderer2$3.run(BasicWMSRenderer2.java:441)
 
Instead of having this dumped to the log file I woul prefer to catch the exception and handle it by myself (msgbox, ... ).
Is it possible to catch these udig-internal messages or register somewhere to be notified if one is thrown?
 
tony roth

Back to the top