Hi everyone.<br><br>I've been using OpenLayers for quite long and recently I was using its HTTP protocol to download some OSM data from OpenStreetMap's Overpass API. I needed to work with some polygon with inner holes and realized that (at least in my version "Release 2.12") there was no support for OSM relations.<br>
<br>I know that relations can get very complex but at least I added support for some cases:<br>- Relation with outer and inner ways (it will create a Polygon with the inner holes)<br><br>- Relation with ways that each of them is a closed polygon (it will create a Polygon for each way and a GeometryCollection containing all of them)<br>
<br>- Relation of ways that none of them is closed but their grouping creates an area (like admin-boundaries for example) (it will create a GeometryCollection with all the LineStrings, not a Polygon because it would need to order all the LineStrings)<br>
<br>- Relation inside Relation (it won't draw the parent relation and it will leave the other one untouched for the loop to draw it normally)<br><br>- Relation with ways and nodes (it will create a GeometryCollection with the ways as Polygons if they are closed or as LineStrings if they aren't and will leave the points separated from it, but they could also be added to the GeometryCollection)<br>
<br>I don't know if something like this has already been made or if it could be useful.<br clear="all"><br>Example here:<br><a href="http://energia.deusto.es/BizkaiSenseIn/">http://energia.deusto.es/BizkaiSenseIn/</a><br>
<br>Thanks.<br><br>-- <br><div><font color="#666666">Ander Pijoan Lamas<br>Research Assistant, Deustotech<br></font></div><div><font color="#666666">Computer Science Engineer<br></font></div><div><font color="#666666">University of Deusto<br>
<br></font></div><div><font color="#666666">E-mail: </font><a href="mailto:ander.pijoan@deusto.es" target="_blank"><font color="#666666">ander.pijoan@deusto.es</font></a></div><div><font color="#666666">Phone: +34 664471228<br>
in: <a href="http://www.linkedin.com/profile/view?id=162888312" target="_blank">http://www.linkedin.com/profile/view?id=162888312</a><br></font></div>