[udig-devel] Server-side uDig

Chris Holmes cholmes at openplans.org
Tue Aug 8 07:51:34 PDT 2006


It'd be nice to coordinate with GeoServer, since it's sort of the server 
side equivalent of uDig right now.  We looked at the RSP stuff last 
week, and have evaluated osgis in the past for use for plugins.  See 
http://docs.codehaus.org/display/GEOS/OSGi.

It wasn't quite mature enough at the time, and I would posit that it's 
still not quite mature enough for us to shift geoserver architecture to 
it without some pain.  But it looks like the RSP is considering spring 
integration, which is what we chose to base our new architecture on. 
And indeed it's got a lot of wicket in there, which we're very 
interested in for the UI side, pluggable gui components.

But yeah, exciting work, we'll be very interested on the geoserver side 
of the fence with what you find.  It'd be great if we could more easily 
share code between udig and geoserver.

best regards,

Chris

Chris Holmes wrote:
> 
> 
> On 8/7/06, *Jesse Eichar* <jeichar at refractions.net 
> <mailto:jeichar at refractions.net>> wrote:
> 
>     Good stuff!  I give you 10 point for creativity.  uDig as a servlet
>     does that mean we have to change the name?
> 
>     Seriously I think this is great.  I will do what I can to support
>     your work.  Any suggestion you have that will make it better for
>     servers please make a JIRA and we will start a thread there.
> 
>     WRT the dependency/Null pointer issue.  I will comment on the Jira task.
> 
>     Jesse
> 
>     On 4-Aug-06, at 12:12 PM, Aleksander Bandelj wrote:
> 
>      > I think uDig and technologies it builds on constitute a really nice
>      > platform for client and server side GIS, so I started experimenting
>      > with server part. So far, I am able to run uDig rendering headless
>      > inside Eclipse Equinox OSGI container. It requires no modifications
>      > to uDig and is also reasonably easy for those familiar with Eclipse
>      > PDE. You need eclipse 3.2 and plugins from equinox incubator:
>      >
>      > org.eclipse.equinox.http.registry
>      > org.eclipse.equinox.servlet.bridge.http
>      > org.eclipse.equinox.jetty.http
>      >
>      > Then you simply create Equinox launch configuration which includes
>      > these bundles and a servlet bundle which registers a servlet on
>      > http registry extension point:
>      >
>      > <extension
>      >         point="org.eclipse.equinox.http.registry.servlets">
>      >         <servlet
>      >               alias="/udig"
>      >               class="test.UdigServlet"
>      >               load-on-startup="true"/>
>      >   </extension>
>      >
>      > I've attached a braindead sample servlet in case somebody is
>      > interested.
>      >
>      > The only problem I've encountered (lost a hour tracking it down)
>      > was with UiPlugin activator. It requires net.refractions.udig
>      > plugin to parse uDig version and fails with NullPointerException if
>      > not present, but net.refractions.udig for some reason isn't
>      > available (maybe because it exports no classes, so Lazy-Start
>      > doesn't work). Anyway, this is now http://jira.codehaus.org/browse/
>      > UDIG-957
>      >
>      > (I think net.refractions.udig.ui should depend on
>      > net.refractions.udig, not the opposite. If net.refractions.udig is
>      > a central point for version and property information, on which
>      > other bundles depend, this dependency should be evident in bundle
>      > manifest.)
>      >
>      > There is also a rather interesting Rich Server Platform proposal,
>      > which talks of server-side Eclipse workbench and OSGI inside web
>      > applications:
>      >
>      > http://www.eclipse.org/proposals/rsp/
>      >
>      > (Note that they are releasing updated demo and tutorial soon)
>      > package test;
>      >
>      > import java.awt.Color;
>      > import java.awt.Dimension;
>      > import java.awt.image.BufferedImage;
>      > import java.io.IOException;
>      > import javax.imageio.ImageIO;
>      > import javax.servlet.ServletException;
>      > import javax.servlet.ServletOutputStream;
>      > import javax.servlet.http.HttpServlet;
>      > import javax.servlet.http.HttpServletRequest;
>      > import javax.servlet.http.HttpServletResponse ;
>      > import net.refractions.udig.project.internal.Map;
>      > import net.refractions.udig.project.internal.render.RenderExecutor;
>      > import net.refractions.udig.project.render.IRenderContext;
>      > import net.refractions.udig.project.tests.support.MapTests ;
>      > import net.refractions.udig.style.sld.SLDContent;
>      > import net.refractions.udig.ui.tests.support.UDIGTestUtil;
>      > import org.eclipse.core.runtime.NullProgressMonitor;
>      > import org.eclipse.core.runtime.Platform ;
>      > import org.geotools.feature.Feature;
>      > import org.geotools.styling.Style;
>      > import org.geotools.styling.StyleBuilder;
>      >
>      > public class UdigServlet extends HttpServlet {
>      >
>      > @Override
>      > public void doGet(HttpServletRequest req, HttpServletResponse res)
>      > throws ServletException, IOException {
>      >       res.setContentType("image/png");
>      >       ServletOutputStream out= res.getOutputStream ();
>      >       try {
>      >               Feature[] features=
>     UDIGTestUtil.createDefaultTestFeatures
>      > ("testType", 3); //$NON-NLS-1$
>      >               Map map= MapTests.createNonDynamicMapAndRenderer
>      > (MapTests.createGeoResource(features, true), new Dimension(512,
>      >                               512));
>      >               map.getViewportModelInternal().zoomToExtent();
>      >               StyleBuilder sb= new StyleBuilder();
>      >               Style style= sb.createStyle(features[0].getFeatureType
>      > ().getTypeName(), sb.createPolygonSymbolizer(Color.BLACK,
>      >                               Color.RED, 2));
>      >               SLDContent.apply (map.getLayersInternal().get(0),
>     style, null);
>      >               RenderExecutor executor= map.getRenderManagerInternal
>      > ().getRenderExecutor();
>      >               try {
>      >                       executor.render ();
>      >                       IRenderContext context= executor.getContext();
>      >                       BufferedImage image= context.getImage();
>      >                      
>     Platform.getJobManager().join(map.getRenderManager (), new
>      > NullProgressMonitor());
>      >                       ImageIO.write(image, "png", out);
>      >               } finally {
>      >                      
>     map.getRenderManagerInternal().stopRendering();
>      >                       executor.dispose();
>      >                       out.flush();
>      >                       out.close();
>      >               }
>      >       } catch (Exception ex) {
>      >               ex.printStackTrace();
>      >       } //$NON-NLS-1$
>      > }
>      > }
>      > _______________________________________________
>      > 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
>     <http://lists.refractions.net/mailman/listinfo/udig-devel>
> 
> 
> !DSPAM:1003,44d8a537293854820651628!

-- 
Chris Holmes
The Open Planning Project
http://topp.openplans.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cholmes.vcf
Type: text/x-vcard
Size: 269 bytes
Desc: not available
Url : http://lists.refractions.net/pipermail/udig-devel/attachments/20060808/4a9e62db/cholmes.vcf


More information about the udig-devel mailing list