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

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


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(
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(
> at net.refractions.udig.project.internal.render.impl.RenderJob.startRendering(
> at
> at
> Caused by: org.opengis.geometry.MismatchedReferenceSystemException: The coordinate reference system must be the same for all objects.
> at org.geotools.geometry.jts.ReferencedEnvelope.ensureCompatibleReferenceSystem(
> at org.geotools.geometry.jts.ReferencedEnvelope.intersects(
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(
> at net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(
> ... 4 more

User-friendly Desktop Internet GIS (uDig)

900913.jpg (30K) Download Attachment