[postgis-devel] polygonize

Carl Anderson carl.anderson at co.fulton.ga.us
Mon Dec 20 06:48:38 PST 2004


strk at refractions.net wrote:

>On Sun, Dec 19, 2004 at 02:09:56PM -0500, Carl Anderson wrote:
>  
>
>>strk at refractions.net wrote:
>>
>>    
>>
>>>On Sun, Dec 19, 2004 at 11:22:09AM -0500, Carl Anderson wrote:
>>>
>>>
>>>      
>>>
>>>>btw
>>>>
>>>>select polygonize_garray(array_append('{}',the_geom) from shapes;
>>>>Causes a backend ABEND;
>>>>  
>>>>
>>>>        
>>>>
>>>Does collect_garray(array_append('{}',the_geom) from shapes work ?
>>>
>>>--strk;
>>>
>>>
>>>      
>>>
>>That also ABENDs the backend;
>>
>>C.
>>    
>>
>
>This is an old problem. The problem is that collect_garray expects
>an array of PG_LWGEOM *pointers*, while array_append builds an array
>of PG_LWGEOM *toasts*.
>
>Those queries should work if written as:
>
> select polygonize_garray(geom_accum('{}',the_geom) from shapes;
> select collect_garray(geom_accum('{}',the_geom) from shapes;
>
>--strk;
>
>  
>

(rhetorical questions follow)
But
polygonize_garray is declared to accept  geometry[].
    is the data type geometry[] intended to be polymorphic?  (pointers 
or TOAST)
or do
       geom_accum, collect_garray and polygonize_garray
       all agree to support something else when passed the geometry[] 
datatype?

select  array_append('{}',the_geom) from shapes limit 2;
                      array_append
---------------------------------------------------------------------
 {SRID=2240;01060000000010000....}
 {SRID=2240;01060000000010000...}
 {SRID=2240;01060000000010000...}

select geom_accum('[]',the_geom) from shapes limit 2;
                    geom_accum
---------------------------------------------------------------------
 [808333614:808333614] = {0100000000}
 [32:32] = {0100000000}
 [32:32] = {0100000000}


C.

-- 
Carl Anderson
GIS Manager Fulton County, Georgia
carl.anderson at co.fulton.ga.us
404.730.8026


-----------------------------------------------------
This message has been scanned for viruses and
dangerous content for Fulton County by DefendMail, and is
believed to be clean.




More information about the postgis-devel mailing list