Yes, that was it, thanks!

But now, whenever I create a new layer, I get an exception from the
BAsicRenderer:

net.refractions.udig.project.render.RenderException: Exception(s)
occured during rendering: null at
net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:301)
at
net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:186)
at
net.refractions.udig.project.internal.render.impl.RenderExecutorImpl$RenderJob.startRendering(RenderExecutorImpl.java:303)
at
net.refractions.udig.project.internal.render.impl.RenderExecutorImpl$RenderJob.run(RenderExecutorImpl.java:358)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58) Caused by:
java.lang.NullPointerException at
com.vividsolutions.jts.geom.Envelope.init(Envelope.java:254) at
com.vividsolutions.jts.geom.Envelope.<init>(Envelope.java:186) at
org.geotools.geometry.jts.ReferencedEnvelope.<init>(ReferencedEnvelope.java:106)
at
net.refractions.udig.catalog.memory.internal.MemoryGeoResourceImpl$ScratchResourceInfo.getBounds(MemoryGeoResourceImpl.java:173)
at
net.refractions.udig.project.internal.impl.GeoResourceInfoInterceptor$Wrapper.getBounds(GeoResourceInfoInterceptor.java:59)
at
net.refractions.udig.project.internal.impl.LayerImpl.getBounds(LayerImpl.java:1856)
at
net.refractions.udig.project.internal.LayerDecorator.getBounds(LayerDecorator.java:362)
at
net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.validateBounds(BasicFeatureRenderer.java:374)
at
net.refractions.udig.render.internal.feature.basic.BasicFeatureRenderer.render(BasicFeatureRenderer.java:216)
 ...
4 more


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:

return new ReferencedEnvelope(bounds, getCRS());

I'm very confused... also I am afraid that this could be one of the
configuration problems coming from using an own perspective or the
like...
Can anyone tell me if I'm wrong or right or something in between?

Thanks
Andrea



On Fri, 7 Sep 2007 09:29:03 -0700 Jesse Eichar
<[EMAIL PROTECTED]> probably wrote:

> RIght I do know the reason.  This is for configurability.  By
> default those action sets are disabled.  To add them you must add a  
> PerspectiveExtension that adds them to your perspective.  Here's the  
> XML snippet that adds them to the MapPerspective:
> 
>     <extension
>           point="org.eclipse.ui.perspectiveExtensions">
>        <perspectiveExtension
>              targetID="net.refractions.udig.ui.mapPerspective">
>           <actionSet
> id="net.refractions.udig.project.ui.LayerActions"/> <actionSet
> id="net.refractions.udig.project.ui.renameSet"/> <actionSet  
> id="net.refractions.udig.project.ui.OpenProjectSet"/>
>        </perspectiveExtension>
>     </extension>
> 
> This is in the project.ui plugin.xml.  In that file the complete  
> perspective extension is there that adds view and perspective  
> shortcuts to the Window > Show View and Window > Open Perspective
> menus
> 
> Jesse
> 
> On Sep 6, 2007, at 11:48 PM, Andrea Antonello wrote:
> 
> > For example the "create layer" from the layer menu.
> >
> > But it is there in the Map and Alternate Map perspective, just not
> > in the JGrass one I made :)
> > I'll have to try to understand why and come back to the list
> > afterward...
> >
> > Ciao
> > Andrea
> >
> >
> > On Thu, 6 Sep 2007 12:38:57 -0700 Jesse Eichar
> > <[EMAIL PROTECTED]> probably wrote:
> >
> >> Which ones specifically?
> >>
> >> Jesse
> >>
> >> On Sep 6, 2007, at 11:10 AM, Andrea Antonello wrote:
> >>
> >>> hi, I had these problems with some menu entries missing in certain
> >>> conditions as for example the create layer  from the leyer menu.
> >>> I noticed that I didn't have this because I set up a perspective
> >>> related to JGrass and views needed for the morphologic analyses.
> >>>
> >>> With the map view they are back.
> >>> Now I have 2 questions:
> >>> 1) why are some commands made perspective dependent and how do I
> >>> add them to my perspective?
> >>> 2) apart of actions are there other things that could suffer of
> >>> this dependency? My fresh exported jgrassudig product dosn't seem
> >>> to work as
> >>> well as the udig product and I honestly can't figure out where the
> >>> problem lies.
> >>>
> >>> Ciao
> >>> Andrea
> >>>
> >>> _______________________________________________
> >>> User-friendly Desktop Internet GIS (uDig)
> >>> http://udig.refractions.net
> >>> http://lists.refractions.net/mailman/listinfo/udig-devel
> >>
> >> _______________________________________________
> >> User-friendly Desktop Internet GIS (uDig)
> >> http://udig.refractions.net
> >> http://lists.refractions.net/mailman/listinfo/udig-devel
> > _______________________________________________
> > User-friendly Desktop Internet GIS (uDig)
> > http://udig.refractions.net
> > http://lists.refractions.net/mailman/listinfo/udig-devel
> 
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to