Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Checking Bounds in BasicFeatureRenderer

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

image/jpg

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


Back to the top