[gdal-dev] Polygon operations

Andreas Oxenstierna andreas.oxenstierna at t-kartor.com
Sun Jun 20 01:53:34 PDT 2021


Correct, you must always densify a line to mimic the behaviour of great-circle, loxodrome etc. in all spatial operations - depending on the definition of the data CRS.
This is a necessity in all ”long navigation” use cases like aero and nautical.


Hälsningar

Andreas Oxenstierna
T-Kartor Geospatial AB
Olof Mohlins väg 12 Kristianstad
+46733206831
andreas.oxenstierna at t-kartor.com<mailto:andreas.oxenstierna at t-kartor.com>
www.t-kartor.com
On 20 Jun 2021, 00:02 +0200, David Strip <gdal at stripfamily.net>, wrote:
On 6/19/2021 2:52 PM, Andrew Bell wrote:
The X and Y dimensions are assumed to lie on a plane. All intersection points are also assumed to lie on the same plane as the polygon. Z values are assigned after the fact.

On Sat, Jun 19, 2021, 4:40 PM David Strip <qgis-user at stripfamily.net<mailto:qgis-user at stripfamily.net>> wrote:
On 6/19/2021 1:34 PM, Andrew Bell wrote:
These are done in 2D, without regard to the spatial reference.
This still doesn't answer the question about great circles.

After some head-scratching and playing in QGIS, I realized that what Andrew is saying is that vertices are treated as Cartesian coordinates  with lon/lat values. QGIS appears to always draw a straight line between any two vertices regardless of the active projection.  This leads to some un-intuitive outcomes. Consider the map below in an Albers projection. The intersection of the two green lines is computed as the pink point. In EPSG:4326, the northern border of the US and the green line are coincident, and the intersection point lies on the visual intersection of the two lines.

 Densification of the line solves the problem, since each vertex is projected, creating the appearance of a curved line.
And for a different use case, there is a Geodesic Densification plug-in to create great circle lines between vertices.

<kikmggcmagihcgff.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210620/272bd312/attachment-0001.html>


More information about the gdal-dev mailing list