[postgis-users] More details for errors
denis.rouzaud at gmail.com
Tue Mar 27 07:09:27 PDT 2012
Well, this working, but this not performant...
Based on your suggestion, I tried this:
Then in view2:
WHERE ST_NumGeometries(wkb_geometry) = 1;
And I can detect problems by doing:
SELECT id FROM view1 WHERE ST_NumGeometries(wkb_geometry) != 1;
But this is slowing down a lot.
I think that the ST_CollectionHomogenize is not the right way. Is there
a better function to transform multiline to line if I am sure I only
On 03/27/2012 02:29 PM, Nicolas Ribot wrote:
> On 27 March 2012 08:02, Denis Rouzaud<denis.rouzaud at gmail.com> wrote:
>> Hi Nicolas, hi all,
>> Thanks for your reply.
>> The problem is:
>> - I cannot filter my view using where geometryType(wkb_geometry) =
>> 'LINESTRING' as it will still return the same error
>> - I cannot check the result of ST_LineMerge in the where clause since
>> aggragates are not allowed in wheres
>> - If I cast to a MULTI, I don't how to check that it is castable to a
>> So, I'll try to reformulate:
>> - Can I check if a MultiLineString is in fact a LineString ?
>> - Is there a way to test the result of LineMerge to see if it is a
>> LineString or MultiLineString?
> The number of elements in the collection will tell you if it is a
> linestring (1 element): st_numGeometries(), or the geometry type
> (geometryType() ) will start by 'MULTI' in case of collection.
> You could add a rule on your view to disallow st_lineMerge results
> producing MULTI elements.
> postgis-users mailing list
> postgis-users at postgis.refractions.net
More information about the postgis-users