Re: [OpenMap Users] saving filled polygons to shapfiles

From: Don Dietrick <dietrick_at_bbn.com>
Date: Wed, 7 Jul 2004 21:08:51 -0400

Hi Tia,

Shape files, as a general rule, don't contain information about how
they should be rendered. OpenMap uses property files to let the user
choose how they should be rendered, but there isn't a way to save that
information for other mapping systems, unless to you want to add fields
to the dbf file for the different rows - but then you'd have to take
steps so that the dbf contents are used for rendering information
later.

-Don

On Jul 1, 2004, at 6:49 PM, serrotam wrote:

>
> Again experimenting with ExampleApplication.java to
> create shaded polygons with OM and saving them to
> shapefiles. This time the filled polygon is drawn to
> the EsriLayer correctly and displayed/painted
> correctly. I can save this layer to shapefiles using
> the code below:
>
> File file = fileChooser.getSelectedFile();
> String path = file.getCanonicalPath();
> EsriGraphicList list = layer.getEsriGraphicList();
> ShpOutputStream pos = new ShpOutputStream(
> new
> FileOutputStream(path + ".shp"));
> int[][] indexData = pos.writeGeometry(list);
>
> ShxOutputStream xos = new ShxOutputStream(
> new
> FileOutputStream(path + ".shx"));
> xos.writeIndex(indexData, list.getType(),
> list.getExtents());
>
> DbfOutputStream dos = new DbfOutputStream(
> new
> FileOutputStream(path + ".dbf"));
> dos.writeModel(layer.getModel());
>
>
> PROBLEM is that when I re-read these shapefiles I only
> get polygon outline but the filled in color is not
> showing up. Where are the filled in properties of the
> polygon saved to? Shouldn't fill-in descriptions be
> also saved into the shapefiles or is this a
> properties file responsability?
>
> I've have searchd the FM to no avail.
>
> tia
>
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> New and Improved Yahoo! Mail - 100MB free storage!
> http://promotions.yahoo.com/new_mail
> --
> [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"]
>
>


=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
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 Wed Jul 07 2004 - 21:09:48 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:05 EDT