[postgis-users] Aggregate Function Malfunction
Mark Fenbers
Mark.Fenbers at noaa.gov
Mon May 23 05:44:05 PDT 2005
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
>
>
-------------- 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/f4682e18/attachment.vcf>
More information about the postgis-users
mailing list