[postgis-users] More details for errors

Denis Rouzaud denis.rouzaud at gmail.com
Mon Mar 26 23:02:51 PDT 2012

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?



On 03/26/2012 02:00 PM, Nicolas Ribot wrote:
>> Hi all,
>> I have a view which does this
>> ST_LineMerge(ST_Union(wkb_geometry))::geometry(LineString,21781)
>> In case of the lines are not juxtaposed, I have this error
>> ERROR:  Geometry type (MultiLineString) does not match column type
>> (LineString)
>> Is there a way of getting the line ID which leads to the error???
> Hi,
> you could execute the SQL query defining the view and filter features
> where geometryType(wkb_geometry) = 'LINESTRING' to identify only
> problematic features.
> Nicolas
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users

More information about the postgis-users mailing list