<div dir="ltr">Dear all,<br><div><div class="gmail_quote"><div dir="ltr"><div><div><br></div>I am so grateful that Anna caught the problem with the examples. But the rest of this discussion is moot. The GeoJSON WG isn't going to revisit any of the specification before it is published unless the RFC Editor finds a technical defect.<br><br></div>Yours,<br></div><div class="gmail_extra"><div><div class="h5"><br><div class="gmail_quote">On Sat, Jul 16, 2016 at 11:25 AM, Keith Jenkins <span dir="ltr"><<a href="mailto:kgj2@cornell.edu" target="_blank">kgj2@cornell.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Okay, my last post for today...<br>
<br>
The answers here provide a good overview of the messy situation:<br>
<a href="http://gis.stackexchange.com/questions/119150/order-of-polygon-vertices-in-general-gis-clockwise-or-counterclockwise" rel="noreferrer" target="_blank">http://gis.stackexchange.com/questions/119150/order-of-polygon-vertices-in-general-gis-clockwise-or-counterclockwise</a><br>
<span><font color="#888888"><br>
Keith<br>
</font></span><div><div><br>
On Sat, Jul 16, 2016 at 2:19 PM, Keith Jenkins <<a href="mailto:kgj2@cornell.edu" target="_blank">kgj2@cornell.edu</a>> wrote:<br>
> Although, to confuse matters, OGC Simple Feature Access seems to<br>
> specify the opposite:<br>
><br>
>> The exterior boundary LinearRing defines the “top” of the surface which<br>
>> is the side of the surface from which the exterior boundary appears to<br>
>> traverse the boundary in a counter clockwise direction. The interior<br>
>> LinearRings will have the opposite orientation, and appear as clockwise<br>
>> when viewed from the “top”,<br>
><br>
> From section 6.1.11.1 (Polygon, Triangle description)<br>
> <a href="http://www.opengeospatial.org/standards/sfa" rel="noreferrer" target="_blank">http://www.opengeospatial.org/standards/sfa</a><br>
><br>
> Keith<br>
><br>
> On Sat, Jul 16, 2016 at 2:12 PM, Keith Jenkins <<a href="mailto:kgj2@cornell.edu" target="_blank">kgj2@cornell.edu</a>> wrote:<br>
>> And exterior-ring-clockwise is how PostGIS interprets the right-hand<br>
>> rule as well:<br>
>>     <a href="http://postgis.net/docs/manual-2.2/ST_ForceRHR.html" rel="noreferrer" target="_blank">http://postgis.net/docs/manual-2.2/ST_ForceRHR.html</a><br>
>><br>
>> Keith<br>
>><br>
>> On Sat, Jul 16, 2016 at 1:25 PM, Jukka Rahkonen<br>
>> <<a href="mailto:jukka.rahkonen@latuviitta.fi" target="_blank">jukka.rahkonen@latuviitta.fi</a>> wrote:<br>
>>> Hi Sean,<br>
>>><br>
>>> Would you mind to check also if what is written about the right-hand rule is<br>
>>> correct:<br>
>>><br>
>>><br>
>>> "Polygon rings MUST follow the right-hand rule for orientation<br>
>>>       (counter-clockwise external rings, clockwise internal rings)"<br>
>>><br>
>>> At least the ESRI shapefile specification defines the right-hand rule in an<br>
>>> opposite way:<br>
>>><br>
>>> "The order of vertices or orientation for a ring indicates which side of the<br>
>>> ring<br>
>>> is the interior of the polygon. The neighborhood to the right of an observer<br>
>>> walking along<br>
>>> the ring in vertex order is the neighborhood inside the polygon. Vertices of<br>
>>> rings defining<br>
>>> holes in polygons are in a counterclockwise direction. Vertices for a<br>
>>> single, ringed<br>
>>> polygon are, therefore, always in clockwise order."<br>
>>><br>
>>> For me it seems that GeoJSON specification is following the left-hand rule,<br>
>>> not the right-hand rule.<br>
>>><br>
>>> -Jukka Rahkonen-<br>
>>><br>
>>><br>
>>><br>
>>> Sean Gillies kirjoitti 2016-07-16 03:38:<br>
>>>><br>
>>>> Hi Anna,<br>
>>>><br>
>>>> Thanks for letting us know about this! I've updated the examples in<br>
>>>> our GitHub repo and sent a patch along to the RFC Editor. When the<br>
>>>> GeoJSON standard is published, the examples will have the correct<br>
>>>> orientation: exterior rings that wind counter-clockwise and interior<br>
>>>> rings that wind clockwise.<br>
>>>><br>
>>>> See <a href="https://github.com/geojson/draft-geojson/issues/231" rel="noreferrer" target="_blank">https://github.com/geojson/draft-geojson/issues/231</a> for the<br>
>>>> specific changes.<br>
>>>><br>
>>>> Yours,<br>
>>>><br>
>>>> On Thu, Jul 14, 2016 at 4:56 AM, Anna Eivazi<br>
>>>> <<a href="mailto:Anna.Eivazi@sharpershape.com" target="_blank">Anna.Eivazi@sharpershape.com</a>> wrote:<br>
>>>><br>
>>>>> Hello geojson-gurus,<br>
>>>>><br>
>>>>> First of all, thank you for all your good work about geojson, we<br>
>>>>> love to use it!;)<br>
>>>>><br>
>>>>> I’ve got a question after trying to figure out which orientation<br>
>>>>> to use for polygons.<br>
>>>>><br>
>>>>> So I’ve read your latest specs:<br>
>>>>><br>
>>>>> <a href="https://datatracker.ietf.org/doc/draft-ietf-geojson/?include_text=1" rel="noreferrer" target="_blank">https://datatracker.ietf.org/doc/draft-ietf-geojson/?include_text=1</a><br>
>>>>><br>
>>>>> Here it is said:<br>
>>>>><br>
>>>>> Polygon rings MUST follow the right-hand rule for orientation<br>
>>>>><br>
>>>>> (counter-clockwise external rings, clockwise internal rings).<br>
>>>>><br>
>>>>> (clear answer to my question, right?)<br>
>>>>><br>
>>>>> But a bit upper in the same doc Polygon section:<br>
>>>>><br>
>>>>> A.3.  Polygons<br>
>>>>><br>
>>>>> Coordinates of a Polygon are an array of LinearRing (see<br>
>>>>><br>
>>>>> Section 3.1.6) coordinate arrays.  The first element in the<br>
>>>>> array<br>
>>>>><br>
>>>>> represents the exterior ring.  Any subsequent elements represent<br>
>>>>><br>
>>>>><br>
>>>>> interior rings (or holes).<br>
>>>>><br>
>>>>> No holes:<br>
>>>>><br>
>>>>> {<br>
>>>>><br>
>>>>> "type": "Polygon",<br>
>>>>><br>
>>>>> "coordinates": [<br>
>>>>><br>
>>>>> [<br>
>>>>><br>
>>>>> [100.0, 0.0],<br>
>>>>><br>
>>>>> [100.0, 1.0],<br>
>>>>><br>
>>>>> [101.0, 1.0],<br>
>>>>><br>
>>>>> [101.0, 0.0],<br>
>>>>><br>
>>>>> [100.0, 0.0]<br>
>>>>><br>
>>>>> ]<br>
>>>>><br>
>>>>> ]<br>
>>>>><br>
>>>>> }<br>
>>>>><br>
>>>>> That would mean clockwise orientation…?<br>
>>>>><br>
>>>>> So, which one u are planning to use in future? So we will stick to<br>
>>>>> it too!<br>
>>>>><br>
>>>>> Thanks a lot!<br>
>>>>><br>
>>>>> Best regards,<br>
>>>>><br>
>>>>> Anna Eivazi<br>
>>>>><br>
>>>>> _______________________________________________<br>
>>>>> GeoJSON mailing list<br>
>>>>> <a href="mailto:GeoJSON@lists.geojson.org" target="_blank">GeoJSON@lists.geojson.org</a><br>
>>>>> <a href="http://lists.geojson.org/listinfo.cgi/geojson-geojson.org" rel="noreferrer" target="_blank">http://lists.geojson.org/listinfo.cgi/geojson-geojson.org</a><br>
>>>><br>
>>>><br>
>>>> --<br>
>>>> Sean Gillies<br>
>>>> _______________________________________________<br>
>>>> GeoJSON mailing list<br>
>>>> <a href="mailto:GeoJSON@lists.geojson.org" target="_blank">GeoJSON@lists.geojson.org</a><br>
>>>> <a href="http://lists.geojson.org/listinfo.cgi/geojson-geojson.org" rel="noreferrer" target="_blank">http://lists.geojson.org/listinfo.cgi/geojson-geojson.org</a><br>
>>><br>
>>> _______________________________________________<br>
>>> GeoJSON mailing list<br>
>>> <a href="mailto:GeoJSON@lists.geojson.org" target="_blank">GeoJSON@lists.geojson.org</a><br>
>>> <a href="http://lists.geojson.org/listinfo.cgi/geojson-geojson.org" rel="noreferrer" target="_blank">http://lists.geojson.org/listinfo.cgi/geojson-geojson.org</a><br>
_______________________________________________<br>
GeoJSON mailing list<br>
<a href="mailto:GeoJSON@lists.geojson.org" target="_blank">GeoJSON@lists.geojson.org</a><br>
<a href="http://lists.geojson.org/listinfo.cgi/geojson-geojson.org" rel="noreferrer" target="_blank">http://lists.geojson.org/listinfo.cgi/geojson-geojson.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br></div></div><span class="HOEnZb"><font color="#888888">-- <br><div data-smartmail="gmail_signature">Sean Gillies</div>
</font></span></div>
</div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Sean Gillies</div>
</div></div>