<br><div class="gmail_quote"><div class="im"><div class="gmail_quote">On 31 March 2010 17:20, James Le Cuirot <span dir="ltr"><<a href="mailto:chewi@aura-online.co.uk" target="_blank">chewi@aura-online.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello,<br>
<br>
I'm trying to turn the English (ceremonial) county boundaries from<br>
OSM into MultiPolygons for use with PostGIS. The last step of the<br>
process is...<br>
<br>
ST_Multi(ST_BuildArea(multi-line string))<br>
<br>
ST_BuildArea returns NULL if the given lines do not form a Polygon or<br>
MultiPolygon. This has worked fine for the majority of counties, even<br>
MultiPolygons like Cumbria and Polygons with holes like Greater London.<br>
However, some simple ones such as Kent and County Durham return NULL<br>
here and I cannot figure out why.<br>
<br>
Here's the relation for Kent.<br>
<br>
<a href="http://api.openstreetmap.org/api/0.6/relation/88071/full" target="_blank">http://api.openstreetmap.org/api/0.6/relation/88071/full</a><br>
<br>
The relationship analyzer says that the segment for Kent is closed.<br>
<br>
<a href="http://betaplace.emaitie.de/webapps.relation-analyzer/analyze.jsp?relationId=88071" target="_blank">http://betaplace.emaitie.de/webapps.relation-analyzer/analyze.jsp?relationId=88071</a><br>
<br>
Am I misunderstanding what it means by closed? Looking at the map, it<br>
appears to be closed. I have called the PostGIS functions ST_IsRing and<br>
ST_IsClosed on the MultiLineString and they return false. Am I making a<br>
bad assumption here?<br>
<br>
I'll be in a lot of trouble if I don't figure this out soon so some<br>
help would be greatly appreciated. :)<br></blockquote></div><br></div>You can use <a href="http://analyser.openstreetmap.fr" target="_blank">http://analyser.openstreetmap.fr</a><br>By entering the relation, you can see that there are 3 self intersections on the coast.<br>
<font color="#888888">
<br>Emilie Laffray<br>
</font></div><br>