<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2657.73">
<TITLE>GEOS union() error</TITLE>
</HEAD>
<BODY>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Hello list.</FONT></P>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">I am trying to get a multipolygon from a union of buffered linestrings. </FONT> <FONT SIZE=2 FACE="Arial">See attached (bad_drawing.jpg) to see what I am trying to achieve.  I have</FONT> <FONT SIZE=2 FACE="Arial">some</FONT><FONT SIZE=2 FACE="Arial"> lines</FONT><FONT SIZE=2 FACE="Arial">trings</FONT><FONT SIZE=2 FACE="Arial">, I want to buffer each line by 400 feet, then combine all of those buffers</FONT> <FONT SIZE=2 FACE="Arial">to create on</FONT><FONT SIZE=2 FACE="Arial">e</FONT><FONT SIZE=2 FACE="Arial"> multipolygon</FONT><FONT SIZE=2 FACE="Arial">.</FONT><FONT SIZE=2 FACE="Arial">  My thought was to do something like:</FONT></P>

<P ALIGN=LEFT><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">select geomunion(buffer(the_geom, 400))</FONT> <FONT COLOR="#0000FF" SIZE=2 FACE="Arial">as the_geom from main</FONT></P>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">However, when I do this, then I get the following error:</FONT></P>

<P ALIGN=LEFT><FONT COLOR="#FF6600" SIZE=2 FACE="Arial">NOTICE:  TopologyException: side location conflict (901411,1.03413e+006,1.03413e+006)</FONT></P>

<P ALIGN=LEFT><FONT COLOR="#FF6600" SIZE=2 FACE="Arial">ERROR: GEOS union() threw an error!</FONT></P>

<P ALIGN=LEFT><FONT COLOR="#FF6600" SIZE=2 FACE="Arial">SQL state: XX000</FONT></P>
<BR>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Now my guess is that the geomunion is throwing the error because the buffers overlap and of course that would be an invalid polygon.</FONT><FONT SIZE=2 FACE="Arial">  So, could someone purpose a different approach to doing this?  Or tell me what I am doing wrong.</FONT></P>
<BR>

<P ALIGN=LEFT><FONT FACE="Arial" SIZE=2 COLOR="#000000"> <<bad_drawing.jpg>> </FONT></P>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Thanks in advance,</FONT></P>

<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Lee</FONT></P>

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.</BODY>
</HTML>