[Chameleon] Saving ROI's to shapefile

wbronsema at dmsolutions.ca wbronsema at dmsolutions.ca
Fri Sep 2 08:41:45 EDT 2005


Hi Jacob,

 

Not sure about the polygon shapeObj but I can perhaps help you with the ROI
structure.   The ROI information is stored in the session called ROIRENDERER
and is typically where I access it.  Doing a quick print_r of the session
will show something like this for a polygon:

 

    [ROIRENDERER] => Array
        (
            [0] => Array
                (
                    [mode] => 1
                    [type] => polygon
                    [aGeoCoords] => Array
                        (
                            [0] => -76.32000000000001
                            [1] => 50.4
                            [2] => 61.920000000000016
                            [3] => 59.040000000000006
                            [4] => 134.64
                            [5] => 4.320000000000007
                            [6] => 95.04000000000002
                            [7] => -61.19999999999999
                            [8] => -33.84
                            [9] => 20.879999999999995
                            [10] => -146.88
                            [11] => -23.040000000000006
                            [12] => -146.16
                            [13] => 37.440000000000005
                        )
 
                    [edgecolor] => 0000FF
                    [edgewidth] => 2
                    [fillcolor] => 0000FF
                    [fillopacity] => 25
                )
 
        )

 

And will show something like this for a circle:

 

[ROIRENDERER] => Array
        (
            [0] => Array
                (
                    [mode] => 1
                    [type] => circle
                    [aGeoCoords] => Array
                        (
                            [0] => 5.759999999999991
                            [1] => 16.560000000000002
                            [2] => 66.05113367651995
                            [3] => 16.560000000000002
                        )
 
                    [edgecolor] => 0000FF
                    [edgewidth] => 2
                    [fillcolor] => 0000FF
                    [fillopacity] => 25
                )
 
        )

 

 

Note that here the two points given here are the center of the circle and a
point on the circle.

 

HTH

 

Regards,

Bill

________________________________________________

William A. Bronsema, C.E.T.
Software & Applications Development,
DM Solutions Group Inc.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20050902/4da0782c/attachment-0001.html


More information about the Chameleon mailing list