[udig-devel] why is the presence of some commands perspective
dependent?
Jody Garnett
jgarnett at refractions.net
Sun Sep 16 11:07:10 PDT 2007
Andrea Antonello wrote:
> Udig doesn't seem to be able to find the bounds of the Scratch layer
> for the in memory datastore.
>
> The really strange thing is that when it comes down to
> MemoryGeoResourceImpl, inside the method:
> public ReferencedEnvelope getBounds() {
> Envelope bounds;
> try {
> bounds = source.getBounds();
> if( bounds instanceof ReferencedEnvelope)
> return (ReferencedEnvelope) bounds;
> return new ReferencedEnvelope(bounds, getCRS());
> } catch (IOException e) {
> return new ReferencedEnvelope(new Envelope(),
> DefaultGeographicCRS.WGS84); }
> }
>
> it fails inside:
>
> bounds = source.getBounds();
>
> where in the source object I read:
> * <p>
> * Currently returns null, consider getFeatures().getBounds()
> instead.
> * </p>
>
> but exactly that makes the creation of the ReferenceEnvelope fail,
> since it uses null:
>
We best return a real bounding box then; I have a hard time explaining
to data store developers that returning bounds is important ;-)
Jody
More information about the udig-devel
mailing list