Re: [OpenMap Users] EsriShapeExport Bug

From: Don Dietrick <dietrick@bbn.com>
Date: Tue Feb 03 2004 - 15:43:07 EST

Hi Brian,

Thanks for the heads-up (you too, Lonnie). I've made some changes to
the file that should improve things. First, I kind of incorporated
Brian's fix, with a little twist. I don't think you want to just set
the record to null every time, you at least want to set it back to what
is passed into the method, and then set it to the next DBF record if it
is null.

I've addressed the lack of ability to write multi-part geometry files.
If the OMGraphicList is an EsriGraphicList, it's handled in a different
export method and just written out to the files preserving the
hierarchical structure, which will be handled by the output code to
make multi-part geometries.

If you pass in a generic OMGraphicList, though, sub-list contents are
just moved to the sorted lists (EsriPolygonList, EsriPolylineList and
EsriPointList). Trying to figure out how the sorted sub-parts fit
together seems like too big of a task when they might be headed off to
different files. If you want to create multi-part geometries, you'll
have to create EsriGraphicLists and then export them.

I've checked these into the beta cvs tree. We're pushing out the new
release this week, come hell or high water. I'm just wrapping in some
final bug fixes and features.

Regards,

- Don

On Feb 3, 2004, at 10:22 AM, Hudson, Brian wrote:

> Don,
>
> There is a bug in the EsriShapeExport class.
>
> In the export(OMGraphicList list, ArrayList record, boolean
> writeFiles) function.
>
> The javadoc for this function states:
>
> /**
> * The record should be set if the list is an embedded
> * list, reusing a record from the top level interation. Set the
> * record to null at the top level iteration to cause the method
> * to fetch the record from the masterDBF, if it exists.
> */
>
> record is never set to null in this function. This can cause every row
> in the dbf to be identical.
>
> I believe this problem can be solved by setting record = null after
> every call to an add function.
>
> The attached EsriShapeExport.java file has the proposed fix included.
>
> Thanks,
>
> Brian Hudson, Jason McIlvain
> NGI Systems<EsriShapeExport.java>

--
[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 Tue Feb 3 15:43:45 2004

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