Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] why is the presence of some commands perspective dependent?

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


Back to the top