[QGIS-ZA-user] South African CRSs in QGIS

Aslam Parker Aslam.Parker at drdlr.gov.za
Fri Nov 16 01:28:54 PST 2018


Hi All



We had a look at the new CRS's in QGIS 3.4.1.



Comparatively, the original CRS metadata is (e.g.):



_________________________________________

Hartebeesthoek94 / Lo19 [EPSG: 2048]    ..... EPSG numbers range from 2046 - 2055

Extent: 17.99, -34.88, 20.00, -28.38          ...... This varies depends on the central meridian

Proj4: +proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=wsu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs



These were the official parameters supplied by Chief Directorate: National Geospatial Information as indicated in the EPSG metadata. EPSG will not add information from non-authoritative sources. In QGIS the values will be correctly displayed, but a rotation of 180 deg will have to be applied for a North up view, unless there is a way for QGIS to automatically rotate view if it detects a south oriented coordinate system. This is regardless of what source CRS data you bring into the project as the on-the fly conversions works well. Unfortunately not all software is able to deal correctly with a left handed system.

These use the correct extent, central meridian, scale factor, reference ellipsoid and positive coordinate order and orientation correctly identified as wsu. These are the recommended CRS's to use when working in Hartbeesthoek94 Projected .



On a really technical level, the relationship between Hartebeesthoek94 and WGS84 is changing and the +towgs84=0,0,0,0,0,0,0 is not true at the sub 1m level.

______________________________________________________________________

The ZANGI:HBK CRS metadata is (e.g.):



South African CRS : HBK_NO_19 [ZANGI:ZANGI:HBKNO19]

Extent: Extent not known

Proj4: +proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +axis=enu +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs



The ZANGI:HBK series of CRS's are similar (no extent in the metadata) but use a north-east positive axis orientation. This CRS is not consistent with the official SACRS and in not recommended. Although it seems that our imagery is correctly displayed when overlaying SG data, the displayed coordinates magnitude and order is correct, but the sign is opposite. These have no EPSG numbers and not recommended for use if you require correctly display of coordinate in the SACRS.

______________________________________________________________________

The new CRS's that have appeared in QGIS have the following metadata (e.g.):



The "EPSG codes" 102480 to 102489 and 102562 to 102568 do not occur in the EPSG registry. (https://www.epsg-registry.org/), our guess is that someone in the QGIS community has added these in QGIS.



Hartebeesthoek94_Lo19 [EPSG:102482]

Extent: Extent not known

Proj4: +proj=tmerc +lat_0=0 +lon_0=19 +k=-1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs



Hartebeesthoek94_Lo19_(E-N) [EPSG:102562]

Extent: Extent not known

Proj4: +proj=tmerc +lat_0=0 +lon_0=19 +k=1 +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs



These have no extent information but use the correct central meridians and ellipsoid. However, the only difference is the scale factor. As there is no reference to the axis orientation, these CRS's probably work in the default north-east orientation and control the orientation using the scale factor, i.e. the former uses a scale factor of -1 while the latter uses a scale factor of 1.



Hence, the latter (E-N) CRS is north-east orientated and the former seems south-west orientated. The EPSG numbers range from 102480 - 102489 for the south west orientated CRS's and 102562 - 102568 for the north-east orientated CRS's. The use of a -1 scale factor is an incorrect implementation to give the impression of a left-handed system.



____________________________________________

In summary, we recommend that only the original CRS's (EPSG 2046 - 2055) which inherently specify the axis orientation in the metadata and do not control the orientation using scale factors be used.



Perhaps a clean-up is in order and in future we should be notified when new CRS's for South Africa are added to the EPSG registry so we can verify them.



Hope this helps.



Kind regards,



Cameron van Eck, Patrick Vorster and Aslam Parker


From: qgis-za-user [mailto:qgis-za-user-bounces at lists.osgeo.org] On Behalf Of Paul Young via qgis-za-user
Sent: Thursday, 15 November 2018 10:08 AM
To: South Africa QGIS user group
Cc: Paul Young
Subject: Re: [QGIS-ZA-user] South African CRSs in QGIS

I still have Proj4 ver 4.9.3. but run QGIS 3.4 but I think the repo is QGIS not Ubuntu GIS. I suppose I could add the Ubuntu GIS repo into /etc/apt/sources.list and run apt-get update and upgrade to get it to 5.2?

On Thu, 15 Nov 2018 09:17 Tim Sutton via qgis-za-user <qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org> wrote:
Hi

For those interested, you can see a detailed report on the EPSG codes published here (go back to the home page to tweak the search string if needed):

http://www.epsg-registry.org/report.htm?type=selection&entity=urn:ogc:def:crs:EPSG::4940&entity=urn:ogc:def:crs:EPSG::4941&entity=urn:ogc:def:crs:EPSG::4148&entity=urn:ogc:def:crs:EPSG::2046&entity=urn:ogc:def:crs:EPSG::2047&entity=urn:ogc:def:crs:EPSG::2048&entity=urn:ogc:def:crs:EPSG::2049&entity=urn:ogc:def:crs:EPSG::2050&entity=urn:ogc:def:crs:EPSG::2051&entity=urn:ogc:def:crs:EPSG::2052&reportDetail=long&style=urn:uuid:report-style:default-with-code&style_name=OGP%20Default%20With%20Code&title=South%20African%20Projections&r=59


QGIS uses a little internal application called crssync to populate it’s internal CRS database from Proj. Layered on top of that are other CRSes that haven’t made their way into EPSG yet. It takes a while for CRS’s to make their way into EPSG -> Proj -> QGIS. The ZANGI definitions were QGIS specific definitions that Gavin and I cooked up in the absence of these CRS’s being in EPSG and Proj. Please let us know if the ones provided in Proj 5 now deprecate the ZANGI and I will remove them from QGIS’s CRS database. We hope to eventually remove the need for QGIS’ own layer on top of the Proj database. Even (proj maintainer) has been talking about moving proj’s CRS database to a sqlite database so in theory we could just have one database that is shared between, proj, gdal, QGIS etc. which would make things more consistent.

BTW Mac users are also still getting Proj 493 in the official Mac packages.


Happy QGISsing :-)

Regards

Tim


On 15 Nov 2018, at 08:52, Immo Blecher via qgis-za-user <qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>> wrote:


Morning Frank,

This is exactly the one I am using but it has proj 493. I will do a complete removal and install again, maybe some older files remain due to dependencies?

Thanks for all your help.

Regards

Immo
On 2018/11/14 08:37, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

This is the repository I'm using:
deb https://qgis.org/ubuntu cosmic main

When I install QGIS 3.4 from this repository it loads Proj 5.1.0 which contains the CRSs I listed in my earlier post.

Frank.

On 2018/11/14 07:58, Immo Blecher via qgis-za-user wrote:

Good Morning,

I think the "latest" proj4 probably sits with the ubuntugis-unstable version. And I am on Ubuntu 18.04 LTS, which apparently does not support the latest ubuntugis-unstable. Or did anybody get it installed and working?

Regards

Immo
On 2018/11/13 19:16, Paul Young via qgis-za-user wrote:
Hi there I tried to pul the Docker Proj4 and it would not upgrade.

It gave: Rel. 4.9.3, 15 August 2016
Maybe it needs to be compiled from source?


On Tue, 13 Nov 2018 at 12:24, Immo Blecher via qgis-za-user <qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>> wrote:

Hi Frank,

That is weird! I am on 3.4, but installed from the Debian link, not the ubuntugis as there I had dependency issues. Maybe there is still a big difference between the two. But I will try the ubuntugis route again. The proj version obviously makes all the difference.

Regards

Immo


On 2018/11/13 12:20, Frank Sokolic via qgis-za-user wrote:
Hi Immo,

Not sure why they don't show up for you. I can see them on QGIS 3.14 and the Proj version is 5.1.0. This is on Ubuntu Linux.

Regards, Frank.

On 2018/11/13 11:31, Immo Blecher via qgis-za-user wrote:

Hi QGIS Users,

I can't find these in my QGIS 3.4. And I see that Proj4 is still on version 4.93, but the latest seems to be 5.2.

But what I also noticed is that Proj4 changed the way it converts from/to Hartebeesthoek94 (15 to 31) from version 4.7 to vers. 4.9: Using proj4 4.7 to convert one had to turn around E-W and N-S, w.o.w. X = -X and Y = -Y and then convert. From vers. 4.9 this was not necessary any longer so I think the calculations in QGIS should be sorted out (it is actually a bug and that is why everything is upside down and right=left). That would also mean that we would not need the ZANGI:ZANGI projections any longer but just use the built-in Hartebeesthoek94 ones.

For what it's worth!

Immo
On 2018/11/13 10:58, Frank Sokolic via qgis-za-user wrote:
Hi QGIS users,

I noticed last week that these CRSs have appeared in QGIS under Project Coordinate Systems > Transverse Mercator:

EPSG:102480 Hartebeesthoek94_Lo15
EPSG:102481 Hartebeesthoek94_Lo17
EPSG:102482 Hartebeesthoek94_Lo19
EPSG:102483 Hartebeesthoek94_Lo21
EPSG:102484 Hartebeesthoek94_Lo23
EPSG:102485 Hartebeesthoek94_Lo25
EPSG:102486 Hartebeesthoek94_Lo27
EPSG:102487 Hartebeesthoek94_Lo29
EPSG:102488 Hartebeesthoek94_Lo31
EPSG:102489 Hartebeesthoek94_Lo33
EPSG:102562 Hartebeesthoek94_Lo19_(E-N)
EPSG:102563 Hartebeesthoek94_Lo21_(E-N)
EPSG:102564 Hartebeesthoek94_Lo23_(E-N)
EPSG:102565 Hartebeesthoek94_Lo25_(E-N)
EPSG:102566 Hartebeesthoek94_Lo27_(E-N)
EPSG:102567 Hartebeesthoek94_Lo29_(E-N)
EPSG:102568 Hartebeesthoek94_Lo31_(E-N)

Anyone know anything about them? Are these now the official South African CRSs in the EPSG database? If so, where are L015_(E-N), L017_(E-N) and L033_(E-N)?

With these new additions, there are now a few versions of the South African CRSs in the QGIS CRS database (e.g. EPSG 2046 to EPSG 2055 as well as ZANGI:HBKNO15 to ZANGI:HBK033) so I guess things need to be cleaned up.

Regards, Frank.

_______________________________________________
qgis-za-user mailing list
qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
--

Immo F. Blecher
Street: 36 Saffraan Ave., Die Boord, Stellenbosch, 7613, South Africa
Postal: PO Box 74, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 736 3302 Email: immo at blecher.co.za<mailto:immo at blecher.co.za> | immob19 at gmail.com<mailto:immob19 at gmail.com> | immob at mymtnmail.co.za<mailto:immob at mymtnmail.co.za>
Internet: http://www.blecher.co.za/
Contact me: [Description: Image removed by sender.] immob19 at gmail.com<mailto:immob19 at gmail.com> [Description: Image removed by sender.] immoblecher

[Description: Image removed by sender.]<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

[Description: Image removed by sender.]


Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.


IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.




_______________________________________________

qgis-za-user mailing list

qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/qgis-za-user




_______________________________________________

qgis-za-user mailing list

qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/qgis-za-user
--

Immo F. Blecher
Street: 36 Saffraan Ave., Die Boord, Stellenbosch, 7613, South Africa
Postal: PO Box 74, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 736 3302 Email: immo at blecher.co.za<mailto:immo at blecher.co.za> | immob19 at gmail.com<mailto:immob19 at gmail.com> | immob at mymtnmail.co.za<mailto:immob at mymtnmail.co.za>
Internet: http://www.blecher.co.za/
Contact me: [Description: Image removed by sender.] immob19 at gmail.com<mailto:immob19 at gmail.com> [Description: Image removed by sender.] immoblecher

[Description: Image removed by sender.]<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

[Description: Image removed by sender.]


Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.


IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/qgis-za-user


--
Regards
Paul Young
Home: +27 (0) 31 5662608
Work: +27 (0) 87 9432416
Mobile: +27 (0) 84 2471544 / +27 (0) 604141439
Google+<http://google.com/+PaulYoung1969> ; LinkedIn<https://www.linkedin.com/in/paulysa1969> ; FaceBook<https://www.facebook.com/paulysa1969> ; Twitter<https://www.twitter.com/paulysa1969> ; Instagram<https://www.instagram.com/paulysa1969> ; Pinterest<https://za.pinterest.com/paulysa1969> ; SnapChat<https://www.snapchat.com/add/paulysa1969>



N �n�r����)em�h�yhiם�w^���
--

Immo F. Blecher
Street: 36 Saffraan Ave., Die Boord, Stellenbosch, 7613, South Africa
Postal: PO Box 74, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 736 3302 Email: immo at blecher.co.za<mailto:immo at blecher.co.za> | immob19 at gmail.com<mailto:immob19 at gmail.com> | immob at mymtnmail.co.za<mailto:immob at mymtnmail.co.za>
Internet: http://www.blecher.co.za/
Contact me: [Description: Image removed by sender.] immob19 at gmail.com<mailto:immob19 at gmail.com> [Description: Image removed by sender.] immoblecher

[Description: Image removed by sender.]<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

[Description: Image removed by sender.]


Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.


IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.




_______________________________________________

qgis-za-user mailing list

qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>

https://lists.osgeo.org/mailman/listinfo/qgis-za-user




N �n�r����)em�h�yhiם�w^���
--

Immo F. Blecher
Street: 36 Saffraan Ave., Die Boord, Stellenbosch, 7613, South Africa
Postal: PO Box 74, Lynedoch, 7603, South Africa
Cell: +27 83 272 6791 | Fax: +27 86 736 3302 Email: immo at blecher.co.za<mailto:immo at blecher.co.za> | immob19 at gmail.com<mailto:immob19 at gmail.com> | immob at mymtnmail.co.za<mailto:immob at mymtnmail.co.za>
Internet: http://www.blecher.co.za/
Contact me: [Description: Image removed by sender.] immob19 at gmail.com<mailto:immob19 at gmail.com> [Description: Image removed by sender.] immoblecher

[Description: Image removed by sender.]<http://www.linkedin.com/pub/immo-blecher/30/414/b8>

[Description: Image removed by sender.]


Please consider your environmental responsibility. Before printing this e-mail message, ask yourself whether you really need a hard copy.


IMPORTANT: The contents of this email and any attachments are confidential. They are intended for the named recipient(s) only. If you have received this email by mistake, please notify the sender immediately and do not disclose the contents to anyone or make copies thereof.


_______________________________________________
qgis-za-user mailing list
qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/qgis-za-user

—






Tim Sutton

Co-founder: Kartoza
Ex Project chair: QGIS.org<http://QGIS.org>

Visit http://kartoza.com<http://kartoza.com/> to find out about open source:

Desktop GIS programming services
Geospatial web development
GIS Training
Consulting Services

Skype: timlinux
IRC: timlinux on #qgis at freenode.net<http://freenode.net>

_______________________________________________
qgis-za-user mailing list
qgis-za-user at lists.osgeo.org<mailto:qgis-za-user at lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/qgis-za-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image006.jpg
Type: image/jpeg
Size: 332 bytes
Desc: image006.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0005.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image007.jpg
Type: image/jpeg
Size: 335 bytes
Desc: image007.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0006.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image008.jpg
Type: image/jpeg
Size: 407 bytes
Desc: image008.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0007.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image009.jpg
Type: image/jpeg
Size: 344 bytes
Desc: image009.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0008.jpg>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image010.jpg
Type: image/jpeg
Size: 332 bytes
Desc: image010.jpg
URL: <http://lists.osgeo.org/pipermail/qgis-za-user/attachments/20181116/1d1c388d/attachment-0009.jpg>


More information about the qgis-za-user mailing list