Hei Larry & others,
thank you for this tip.
I got now the plugin to run as it should :)
I also could make MrSID working with the new Open-File-Framework.
(note: the files: mrsidgeodecode.exe and mrsidgeoinfo.exe have to be
placed in the 'ext' folder now. The same holds for the tmp folder)
However.. a problem that persists with the OpenFileFramework is that the
temporary jpg-files are not always delted (even if I set a 1000xloop).
And furthermore, some very few files are also not delted if I set
deleteOnExit. Has anybody any idea.. what is happening?
stefan
Larry Becker schrieb:
> Hi Stefan,
>
>
> >a) I get an error message, when I use Zoom WMS Layer (which should of
> >course not work, as it isn't a WMS layer)
> >
> > Do you have here any hint too?
>
> The following change to ZoomToWMSPlugIn should address the problem of
> allowing Zoom to WMS Layer to enable with MrSID Layers:
>
> private WorkbenchContext workbenchContext;
>
> public void initialize( PlugInContext context ) throws Exception {
> this.context = context;
> workbenchContext = context.getWorkbenchContext();
>
> EnableCheckFactory enableCheckFactory = new EnableCheckFactory(
> context
> .getWorkbenchContext() );
>
> EnableCheck enableCheck = new MultiEnableCheck().add(
>
> enableCheckFactory.createWindowWithLayerManagerMustBeActiveCheck() ).add(
>
> enableCheckFactory.createExactlyNLayerablesMustBeSelectedCheck( 1,
> WMSLayer.class ))
> .add(new EnableCheck()
> {
> public String check(JComponent component)
> {
> for (Iterator i =
> workbenchContext.getLayerNamePanel().selectedNodes(WMSLayer.class).iterator();
>
> i.hasNext();)
> {
> WMSLayer layer = (WMSLayer) i.next();
> if (layer.getClass() == SIDLayer.class)
> {
> return "Exclude SID layers from
> selection";
> }
> }
> return null;
> }
> });
>
> context.getFeatureInstaller()
> // .addMainMenuItemWithJava14Fix ( this, new String [
> ] { "View" },
> .addMainMenuItemWithJava14Fix( this, new String[] {
> MenuNames.VIEW },
> I18N.get(
> "org.openjump.core.ui.plugin.wms.ZoomToWMSPlugIn.zoom-to-wms-layer" )
> + "{pos:8}", false, null, enableCheck );
> //enableCheck );
> // Add PlugIn to WMSPopupMenu
> context.getFeatureInstaller().addPopupMenuItem(
> context.getWorkbenchFrame().getWMSLayerNamePopupMenu(), this,
> I18N.get(
> "org.openjump.core.ui.plugin.wms.ZoomToWMSPlugIn.zoom-to-wms-layer" ),
> false,
> null, enableCheck );
>
> } // End initialize ( )
>
> To actually support Zoom to SID Layer, it would be necessary to update
> the SIDLayer code from SkyJUMP (I think) and port over the ISA
> ZoomToWMSLayerPlugIn.
>
> BTW, I see no reason why the system temporary folder couldn't be used
> instead of ../tmp.
>
> regards,
> Larry
>
> On Sun, Apr 27, 2008 at 8:47 PM, Stefan Steiniger <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
>
> wow..
>
> sometimes solutions can be very simple.
> And.. tata.. loading of MrSID layers works with your origial code (and
> in Eclise.)
>
> thank you Larry!
>
> Next weekend I may tackle the then the following things:
>
> a) I get an error message, when I use Zoom WMS Layer (which should of
> course not work, as it isn't a WMS layer)
>
> (com.vividsolutions.jump.workbench.model.WMSLayer.getService(WMSLayer.java:240))
>
> Do you have here any hint too?
>
> b) to adjust the folder settings for OpenJUMP (i.e. use
> context.getWorkbench().getPlugInManager().getPlugInDirectory())
>
> c) think about the automatic creation of a tmp folder
>
> d) check why MrSID does not run with Paul's Framework
>
> stefan
>
> Larry Becker schrieb:
> > Hi Stefan,
> >
> > Sorry you had to waste time with this. You were on the right track.
> > It can be fixed by commenting out the blackboard stuff in
> SIDLayer. Like:
> >
> > // private Blackboard blackboard = new Blackboard();
> > // public Blackboard getBlackboard()
> > // {
> > // return blackboard;
> > // }
> >
> > I'm not sure why this suddenly became a problem.
> >
> > regards,
> > Larry
> >
> >
> > On Sun, Apr 27, 2008 at 6:50 PM, Stefan Steiniger
> <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
> > <mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>>> wrote:
> >
> > Hei,
> >
> > ok.. I got a problem where I lack knowledge (and time) on
> solving the
> > problem.
> >
> > The problem:
> > One gets a null pointer exception if one tries to add a
> SIDLayer in OJ
> > 1.2. The null pointer comes from a non existing Blackboard inside
> > WMSLayer. SIDLayer actually extends WMLayer (in this case
> > WMSLayer.init() is called first - before any code in SIDLayer is
> > executed.. so it looks like I can not solve the issue in SIDLayer
> > itself, or can I?).
> >
> > The cause seems to be, that the constructors of WMSLayer have
> been
> > changed within the last half year (from revision 908 on).
> >
> > I tried now the simple way of just using an old version of
> WMSLayer. But
> > then I get the problem, that JUMP does not know how to render the
> > SIDLayer (as it becomes a different instance of WMSLayer,
> i.e. the old
> > WMSLayer that I would like to use has then a different class
> path...
> > jippy). Ok.. a next step would be to add an extra renderer
> and factory,
> > by simply copying and renaming the WMS-Renderer stuff. But..
> here I
> > stuck again.. I have no idea how to do the assignment between
> LayerType
> > and Renderer (using the contentId stuff)... and this
> furthermore it is
> > also a "stupid" solution. A better Idea would be to use Ole's
> Pirol
> > solution or what Paul has written in the RenderingManager.
> But I simply
> > lack background knowledge and willingness on how to use both
> approaches
> > (every GUI/rendering stuff is far over my self-taught programming
> > knowledge).
> >
> > So.. if anybody has suggestions... or is willing to fix it,
> then he is
> > warmly welcome!!! ..or somenody writes a DOC on how to add a
> new image
> > renderer....
> > I am looking forward to the day when I want to find out how
> to add the
> > ImageJ stuff from Erwans team (which probably requires as
> well to look
> > into the rendering stuff :(
> >
> > time for dinner now
> > Stefan
> >
> > PS: conclusion: MrSID Layers support is dumped since OJ1.2
> (F) and
> > future versions.
> >
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to
> save $100.
> > Use priority code J8TL2D2.
> >
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > [email protected]
> <mailto:[email protected]>
> > <mailto:[email protected]
> <mailto:[email protected]>>
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
> >
> >
> >
> >
> > --
> > http://amusingprogrammer.blogspot.com/
> >
> >
> >
> ------------------------------------------------------------------------
> >
> >
> -------------------------------------------------------------------------
> > This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> > Don't miss this year's exciting event. There's still time to save
> $100.
> > Use priority code J8TL2D2.
> >
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Jump-pilot-devel mailing list
> > [email protected]
> <mailto:[email protected]>
> > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
>
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> <mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>
>
>
>
> --
> http://amusingprogrammer.blogspot.com/
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
> Don't miss this year's exciting event. There's still time to save $100.
> Use priority code J8TL2D2.
> http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Jump-pilot-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Jump-pilot-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel