Checking Bounds in BasicFeatureRenderer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Checking Bounds in BasicFeatureRenderer

Jody Garnett-2
Hi Jesse:

I need a code review for some work done earlier on BasicFeatureRenderer.validateBounds.
The code is set to check the data bounds against the screen; and has been causing some trouble.

The addition was the use of ReferencedEnvelopeCache to obtain a "good enough" CRS in cases where the data source itself could not know what is going on; this also handles the case of WFS where the the user draws new content that is "outside" of the box described by the WFS capabilitiesDocument.

The code is failing when comparing referenced envelopes of different CRS; I have gone in and done a check prior to each test; but an extra set of eyes is needed.

Matthias I was able to use 900913; however if you use the default data included with uDig:
- countries.shp fails (too many problems with shapes close to the poles) you can see it draw a bunch of content and then stop 1/2 way through
- cites.shp is fine
- bluemarble renders fine; until you zoom too far out (ie until it tries showing content too close to the poles


Jody

On 09/06/2010, at 12:30 AM, Matthias Lendholt wrote:

> net.refractions.udig.project.render.RenderException: Exception(s) occured during rendering: The coordinate reference system must be the same for all objects.
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:355)
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:224)
> at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(RenderJob.java:108)
> at net.refractions.udig.project.internal.render.impl.RenderJob.run(RenderJob.java:213)
> at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
> Caused by: org.opengis.geometry.MismatchedReferenceSystemException: The coordinate reference system must be the same for all objects.
> at org.geotools.geometry.jts.ReferencedEnvelope.ensureCompatibleReferenceSystem(ReferencedEnvelope.java:302)
> at org.geotools.geometry.jts.ReferencedEnvelope.intersects(ReferencedEnvelope.java:489)
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(BasicFeatureRenderer.java:445)
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:253)
> ... 4 more

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

900913.jpg (30K) Download Attachment
Loading...