[PROJ] How does proj deal with ellipsoid with respect to reprojection
Lesparre, Jochem
Jochem.Lesparre at kadaster.nl
Sat Mar 28 23:28:57 PDT 2020
Doing point in polygon in a projection will result in occasional wrong conclusions. A point near de edge can seem to be inside the polygon while it's outside, or the other way around, since a straight line in the projection deviates from the geodesic.
I analysed this problem for the Netherlands (51 - 55 degrees north) in the azimuthal projection (+proj=sterea) of the national coordinate reference system RD (epsg:28992) and in plate-caree projection (+proj=lonlat). The deviation depends on the length, orientation and location of a polygon segment. I computed the maximum possible deviation in the Netherlands for both projections to advise the Dutch government not to allow any segments longer than 200 m in a new digital storage system for policy and zoning borders.
Table for the Netherlands:
Segment length, RD deviation, lonlat deviation;
500 km, 160 m, 6 km;
200 km, 25 m, 1 km;
100 km, 6.4 m, 0.2 km;
50 km, 1.6 m, 60 m;
20 km, 26 cm, 9.7 m;
10 km, 8 cm, 2.4 m;
5 km, 3 cm, 60 cm;
2 km, 5 mm, 9.7 cm;
1 km, 1.3 mm, 2.4 cm;
500 m, 0.3 mm, 6 mm;
200 m, <0.1 mm, 1 mm;
100 m, <0.1 mm, 0.2 mm;
50 m, <0.1 mm, <0.1 mm
This means that when you first split long segments of polygons by adding enough points along the geodesic, you could do a point in polygon even in lonlat. The required distance between the added points depends on the location (latitude). Near the poles it will get a bit tricky, as the maximum deviation increases to 50% of the size of the segment length.
Regards, Jochem
________________________________
From: PROJ <proj-bounces at lists.osgeo.org> on behalf of Pierre Abbat <phma at bezitopo.org>
Sent: Sunday, March 29, 2020 1:27:00 AM
To: proj at lists.osgeo.org <proj at lists.osgeo.org>
Subject: Re: [PROJ] How does proj deal with ellipsoid with respect to reprojection
On Saturday, 28 March 2020 10:58:53 EDT DeTracey, Brendan wrote:
> Hi,
>
> I am using a gnomonic projection for point in polygon testing. The
> transformation is:
>
> projinfo -s EPSG:4326 -t ' +type=crs +ellps=WGS84 +datum=WGS84 +proj=gnom
> +lat_0=61.39107201212929 +lon_0=-58.56360634793518'
>
> Will transformed great circles still be straight lines? Or does the fact
> that my source and target ellipse/datum are the same mean the gnomonic
> projection has the WGS4 coordinates passed directly to it? My confusion
> comes from gnomonic only being defined for a sphere, not an ellipsoid.
In Bezitopo, I use a stereographic projection for point-in-polygon testing.
This avoids the problem with the gnomonic projection that a polygon may cross
the great circle which is projected to infinity. In stereographic, only one
point is projected to infinity, and I chose it to be in the ocean, more than a
megameter from any land, and with unround coordinates. Stereographic turns
great circles into circles, so a spherical polygon turns into a polyarc in the
plane, which I can handle easily.
Pierre
--
When a barnacle settles down, its brain disintegrates.
Já não percebe nada, já não percebe nada.
_______________________________________________
PROJ mailing list
PROJ at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj
________________________________
From: PROJ <proj-bounces at lists.osgeo.org> on behalf of Pierre Abbat <phma at bezitopo.org>
Sent: Sunday, March 29, 2020 1:27:00 AM
To: proj at lists.osgeo.org <proj at lists.osgeo.org>
Subject: Re: [PROJ] How does proj deal with ellipsoid with respect to reprojection
On Saturday, 28 March 2020 10:58:53 EDT DeTracey, Brendan wrote:
> Hi,
>
> I am using a gnomonic projection for point in polygon testing. The
> transformation is:
>
> projinfo -s EPSG:4326 -t ' +type=crs +ellps=WGS84 +datum=WGS84 +proj=gnom
> +lat_0=61.39107201212929 +lon_0=-58.56360634793518'
>
> Will transformed great circles still be straight lines? Or does the fact
> that my source and target ellipse/datum are the same mean the gnomonic
> projection has the WGS4 coordinates passed directly to it? My confusion
> comes from gnomonic only being defined for a sphere, not an ellipsoid.
In Bezitopo, I use a stereographic projection for point-in-polygon testing.
This avoids the problem with the gnomonic projection that a polygon may cross
the great circle which is projected to infinity. In stereographic, only one
point is projected to infinity, and I chose it to be in the ocean, more than a
megameter from any land, and with unround coordinates. Stereographic turns
great circles into circles, so a spherical polygon turns into a polyarc in the
plane, which I can handle easily.
Pierre
--
When a barnacle settles down, its brain disintegrates.
Já não percebe nada, já não percebe nada.
_______________________________________________
PROJ mailing list
PROJ at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/proj
Disclaimer:
De inhoud van dit bericht is uitsluitend bestemd voor geadresseerde.
Gebruik van de inhoud van dit bericht door anderen zonder toestemming van het Kadaster
is onrechtmatig. Mocht dit bericht ten onrechte bij u terecht komen, dan verzoeken wij u
dit direct te melden aan de verzender en het bericht te vernietigen.
Aan de inhoud van dit bericht kunnen geen rechten worden ontleend.
Disclaimer:
The content of this message is meant to be received by the addressee only.
Use of the content of this message by anyone other than the addressee without the consent
of the Kadaster is unlawful. If you have received this message, but are not the addressee,
please contact the sender immediately and destroy the message.
No rights can be derived from the content of this message
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20200329/a671f9d8/attachment-0001.html>
More information about the PROJ
mailing list