Re: Drawing Tool Layer

From: Donald Dietrick <dietrick@bbn.com>
Date: Fri Jan 04 2002 - 11:17:05 EST

OK, two different topics, answered in-line. :)

On Friday, January 4, 2002, at 10:19 AM, Allan Doyle wrote:

> I think it would be even better to be able to turn things into GML. But
> I suspect that a general OMGraphic publisher class could get built that
> would make it easy to write to different formats. (Postscript/PDF and
> SVG come to mind).

A PDFFormatter was once written and worked, but was not refined for
release and stomped out of my code base before I could be back to it.
It relied on the retepPDF package (http://www.retep.org.uk/pdf), which
can't handle images yet. The vector OMGraphics rendered into it fine.
That wouldn't be hard to create.

Likewise, an SVGFormatter could be created very easily, using the Batik
package. The PDFFormatter and SVGFormatter would act almost
identically, the only difference being the Graphics object they pass to
the layers that is rendered into, plus a couple of different calls to
setup that Graphics object which drives an output file's contents.

PDFFormatter and SVGFormatter don't exist, but that's what I would call
them, extending ImageFormatter in the image package.

A GML writer would probably be an OMGraphic -> GMLGraphic convertor.
Likewise, GMLGraphic doesn't exist.

> A GML writer would be much easier than a GML reader since you would not
> really have to be able to parse all of GML. But a GML reader would be
> fantastic because then OpenMap could display the new Ordnance Survey
> MasterMap data.

No doubt. The GML4Java package is available on sourceforge, for reading
GML. I've looked at it, but I need to brush up on the packages it
relies on from the w3c before I can use it.

> Karl Stuempfle wrote:
>>
>> Is there any plan to be able to "capture" the drawing tool layer to a
>> shapefile? Possibly add a method that takes a filename and then
>> generates a
>> shapefile containing the graphics that were drawn onto the layer?

Any object that implements the DrawingToolRequestor can receive
OMGraphics created from the OMDrawingTool. The OMDrawingToolLauncher
uses the BeanContext to find out which components could catch objects
that are created.

It's a matter of adding a simple method, and making sure the EsriPlugIn
gets added to the MapHandler.

Alternatively, a GUI could be added to the EsriPlugIn to call for
creation of a OMGraphic that matches the type of graphic in the shape
file. It's pretty simple, as demonstrated in the DemoLayer. There
would/should be a way to add attributes to the dbf file, too, in the GUI.

>> Is anybody already done this?

Not that I know of, but there are a couple of issues to take care of :

1. The graphic lists in the esri package may expect that all OMGraphics
are members of a sub OMGraphicList - OMGraphics are not expected to be
directly added to the top level list. I know the output code needs to
be updated to handle that change, and I think the lists themselves might
need to be checked to make sure that they allow OMGraphics to be added
directly.

2. Some kind of infrastucture needs to be added to interact with the
users to show what type of graphic is required, and to let them know why
a graphic is rejected if it doesn't match.

>> Alternatively, has anyone written a generic method to take an
>> OMGraphicList
>> and export a set of shapefiles for it, using the new (4.4.2 version)
>> ESRIPlugin code?

Cool, but I haven't heard of anyone has done it.

- Don

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Donald Dietrick, dietrick@bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

--
[To unsubscribe to this list send an email to "majdart@bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Fri Jan 4 11:14:45 2002

This archive was generated by hypermail 2.1.8 : Thu May 12 2005 - 07:18:32 EDT