[postgis-users] Aggregate Function Malfunction
Mark Fenbers
Mark.Fenbers at noaa.gov
Mon May 23 06:00:27 PDT 2005
Problem solved. I removed the INITCOND = '' and all works fine now.
Earlier, I got this error even before I added INITCOND = '' which is why
I didn't think to remove it now, but then there was probably something
else wrong with the syntax of things...
Thanks anyway!
Mark
Mark Fenbers wrote:
> Yes, it reports the same error with no results. Other ideas?
> Mark
>
> Stephen Woodbridge wrote:
>
>> Mark,
>>
>> Did you try something like:
>>
>> SELECT IsValid( MultiIntersection( the_geom )) FROM myTable WHERE
>> IsValid(the_geom);
>>
>> to see what it reports?
>>
>> -Steve
>>
>> Mark Fenbers wrote:
>>
>>> I have a table populated with geometries (polygons to be exact) that
>>> were created with other PostGIS functions. They were added to this
>>> table after passing the IsValid() test. A SELECT query using
>>> IsValid() verifies that all geometries in the table are valid. But
>>> when I run the query,
>>>
>>> SELECT Npoints( MultiIntersection( the_geom )) FROM myTable WHERE
>>> IsValid(the_geom);
>>>
>>> I get an error "parse error - invalid geometry". I cannot tell
>>> which record is triggering the error because MultiIntersection() is
>>> an *aggregate* function I created to take the cumulative
>>> Intersection() of several polygons in the table (one per row). It
>>> is defined as such:
>>>
>>> CREATE AGGREGATE MultiIntersection (
>>> BASETYPE = GEOMETRY,
>>> SFUNC = Intersection,
>>> STYPE = GEOMETRY,
>>> INITCOND = ''
>>> );
>>>
>>> I'm going on the assumption that, because this is my first attempt
>>> at my own aggregate function, I am doing something incorrectly. But
>>> I can figure out what it is I am doing wrong. Can you help, please?
>>> Some of my cluelessness may be in part due to a lack of my
>>> understanding the STYPE, and BASETYPE parameters as well as what the
>>> INITCOND setting should be. I have not successfully found any
>>> documentation on these other than syntax and examples.
>>>
>>> Mark
>>
>>
>>
>_______________________________________________
>postgis-users mailing list
>postgis-users at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Mark.Fenbers.vcf
Type: text/x-vcard
Size: 283 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20050523/5d75fce5/attachment.vcf>
More information about the postgis-users
mailing list