[Qgis-user] How to determine the inner surface on a sphere or ellipsoid

Nyall Dawson nyall.dawson at gmail.com
Wed Jun 17 15:46:44 PDT 2020


On Wed, 17 Jun 2020 at 20:27, Nicolas Cadieux
<nicolas.cadieux at archeotec.ca> wrote:
>
> Hi Nyall,
>
> Just out of curiosity, would a very large polygon slow down a spatial query or would just a complex one?

That's an open question. It depends on lots of different factors,
including crucially what you're comparing the large polygon against.
But a general answer would be "yes": a large but simple polygon does
have the potential to result in a worse query vs a smaller polygon
using a disjoint relationship.

> My testing with using shapefiles to reclassify LiDAR data did show that things could be sped up by splitting large polygons with a smaller grid but I had attributed this to the complexity of the polygons and not the size.  Was this a wrong assumptions?

I think in general you'll find that polygon complexity is a much more
significant factor vs the actual size, so your conclusion is fine. (My
hint: using the QGIS Processing "subdivide" or PostGIS' st_subdivide
tools are perfect to help in this situation)

Nyall



>
> Nicolas Cadieux
> Ça va bien aller!
>
> > Le 16 juin 2020 à 18:21, Nyall Dawson <nyall.dawson at gmail.com> a écrit :
> >
> > On Wed, 17 Jun 2020 at 02:10, Richard Duivenvoorde <rdmailings at duif.net> wrote:
> >>
> >>> On 6/16/20 4:17 PM, Tudorache, Marian wrote:
> >>> Hi everyone,
> >>>
> >>> I have a list of polygons given by a list of points.
> >>> The polygons are properly drawn on QGIS canvas by creating the geometries, the each geometry is used to create a Qgsfeature which are saved on a shapefile.
> >>> The problem appears in detecting if a point on the Earth is inside or outside the polygon.
> >>> Using pyqgis QgsGeometry intersects function returns proper value.
> >>> However when I export the polygon to intermaphics from Kongsberg Geospatial (former Gallium) sometime the point is inside other time is outside the polygon.
> >>> I tried to switch the order of the points is QGIS ,but the intersects function always give me the same result regardless of the order of the points.
> >>> In intermaphics the intersection between a polygon and a point varies with the order of the points which define a polygon.
> >>> I talked to people from gallium and they confirmed the order of the points is important.
> >>> In one direction a inner area of the polygon is the small surface and if I switch the order the inner area is the outside and it wraps the Earth on the opposite side.
> >>>
> >>> Does QGIS or pyqgis has a similar mechanism to determine which is the inner part of the polygon on a sphere or ellipsoid?
> >>
> >> Hi Marian,
> >>
> >> are'nt we here talking about the so called Right Hand Rule?
> >
> > That's just a convention -- it doesn't change what the boundary
> > actually represents.
> >
> > If you want to do analysis based on points which fall outside a
> > digitized polygon, you should use a "disjoint" relationship. The
> > alternative is to do what Nicolas suggested and make a polygon which
> > covers the globe minus a small hole, but you'll get terrible
> > performance with any analysis using that approach...!
> >
> > Nyall
> > _______________________________________________
> > Qgis-user mailing list
> > Qgis-user at lists.osgeo.org
> > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user


More information about the Qgis-user mailing list