Hi Tom,
I don't think the EsriShapeExport can handle Location objects as
written. EsriShapeExport looks at OMGraphics to see what kind they
are, so it can sort them out into a point/polyline/polygon list as
necessary. A Location object, even though it's an OMGraphic, actually
renders some internal OMGraphics that the EsriShapeExport doesn't know
to ask for - so the Location probably ends up being unrecognizable and
discarded.
You could extend EsriShapeExport to handle the Location object as a
point. You probably have to override the export(OMGraphicList list,
ArrayList masterRecord, boolean writeFiles) for that.
Regards,
Don
On Oct 14, 2004, at 11:55 AM, Whanger, Thomas wrote:
> I am attempting to export my Location objects stored in an
> OMGraphicList to a shp file using the EsriShapeExport class.
>
>
>
> It doesn't seem to generate any files though. I have gotten the class
> to successfully generate the files for OMPoints and such, but does the
> EsriShapeExport class not deal with Location objects?
>
>
>
> If not, does anyone have any ideas in how to go about doing this? Any
> help is greatly appreciated.
>
>
>
> Thanks,
>
> -Tom
>
>
>
>
>
> Here is a very simple example of what I am trying to do:
>
> OMGraphicList list = new OMGraphicList();
>
> OMGraphic location = new BasicLocation(37.0f, 10.0f, "Testing", null);
>
> list.add(location);
>
>
>
> Projection proj = ProjectionFactory.makeProjection(
>
> ProjectionFactory.getProjType("MERCATOR"),
>
> 30.0f,
>
> 0.0f,
>
> 30000000,
>
> 400,
>
> 640);
>
>
>
> EsriShapeExport test = new EsriShapeExport(list, proj, "C:\\Documents
> and Settings\\twhanger\\Desktop\\test");
>
> test.export();
>
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Don Dietrick, dietrick_at_bbn.com
BBN Technologies, Cambridge, MA
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Thu Oct 14 2004 - 13:35:10 EDT