Skip to content

Projection tests of PROJ.org projections, using PostGIS

Notifications You must be signed in to change notification settings

osm-codes/ProjTests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

ProjTests

Map projection tests of PROJ.org library projections, using PostGIS.

Install

On Linux with PostgreSQL v9+.

cd ProjTests/src
cat step0*.sql | psql postgres://postgres@localhost/test

Testing DGGS

Some DGGS projections with "good fit to WGS84" claims (ref1, ref2), that are not seems realistic for Brazilian territory.

At this PostGIS SQL scripts, using ST_Area(geom,true) as reference of "WGS84 area measure", and ST_Area(geom) as projected sample, we can reproduce the projtest.vw06_proj_cmp_summary report:

projection label and definition proj_diff_avg
BR:IBGE   classical Albers equal-area,
+proj=aea +lat_0=-12 +lon_0=-54 +lat_1=-2 +lat_2=-22 +ellps=WGS84
0.0%
DGGS:001:rHEALPix   +proj=rhealpix (default +ellps=GRS80) 17.8%
DGGS:002:rHEALPix   +proj=rhealpix +ellps=WGS84 17.8%
DGGS:030:ISEA   +proj=isea 0.5%
DGGS:032:ISEA   +proj=isea +ellps=WGS84 0.5%

The column proj_diff_avg is the average of area-difference of some sample zones (Geohash rectangles with different areas) at Brazil. The VIEW projtest.vw02_proj_cmp_raw shows raw data. To see Geohash cells ("ghs" column), use viewer1 or viewer2.

The projection BR:IBGE is the official, used by Census, demonstrating that PROJ Lib can fit to WGS84.

Testing area distortion by elevation

Using projtest.vw04_area_factors_summary we can show that the "WGS84 area measure" distortion (column "km2_change") grows with elevation, and that from ~1 km elevation upwards, the distortion of ~0.01% (or more) cannot be ignored.

city_name elevation km2_change
Fortaleza 20 0.0003%
Uruguaiana 70 0.0011%
Manaus 90 0.0014%
Santa Maria 110 0.0017%
Trindade (ilha) 170 0.0027%
Sao Paulo 760 0.0120%
Mané Garrincha (estadio) 1200 0.0188%
La Paz 3650 0.0573%

License

CC0.

About

Projection tests of PROJ.org projections, using PostGIS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published