Opened 3 years ago

Last modified 3 years ago

#56062 new defect

QGIS and QGIS3 built with the proj 5.0.0 fail to reproject many coordinates

Reported by: news24lor Owned by:
Priority: Normal Milestone:
Component: ports Version: 2.4.2
Keywords: Cc: Veence (Vincent)


I use a lot of QGIS and have noticed a serious error in the versions currently present in MacPorts.

QGIS 2.18.17 and QGIS 3.0.0 are built with proj 5.0.0 and fail to reproject many coordinates, one of the most powerful GIS features. In this way QGIS is completely unusable. It's a problem that came out a few days ago and the solution will probably come in April with the version of proj 5.0.1.

In the meantime, is it possible to enable the construction of QGIS and QGIS3 with the previous proj 4.9.3, the most reliable, so that QGIS can be used immediately?

Thank you

Attachments (2)

screenshot_qgis3_proj493_macports.jpg (84.3 KB) - added by news24lor 3 years ago.
Portfile-proj.diff (1.4 KB) - added by fhanzer (Florian Hanzer) 3 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 3 years ago by news24lor

I can confirm that the problem is the proj 5.0.0 library. Cause continuous errors with QGIS. I build QGIS with the old project library 4.93 and the problems are solved: now everything works. Please reinsert version 4.9.3 because version 5.0.0 does not work well.


comment:2 Changed 3 years ago by Veence (Vincent)

Okay, I’m going to upgrade the proj47 port to 4.9.2 and change the QGis Portfile to use that version until the patched version of PROJ 5 comes out.

comment:3 Changed 3 years ago by news24lor


Thank you

comment:4 Changed 3 years ago by Veence (Vincent)

Turns out this doesn’t seem to be possible. At least QGis3 depends on API functions only found in Proj 5. I’m going to dig further, but don’t be hopeful of any change :(

Changed 3 years ago by news24lor

comment:5 Changed 3 years ago by news24lor

I was able to compile in MacPorts, QGIS3 with proj49 (see screenshot) even if version 3 has bugs related to Qt5 components.

Keeping proj49 and proj5 to compile other software is important. However, for a long time we will still use QGIS 2.18.x because the 3 has bugs and especially missing many important plugins. With QGIS 2.18.x proj49 it is mandatory.

Thanks again

comment:6 Changed 3 years ago by Veence (Vincent)

Uh. How did you do that?

comment:7 Changed 3 years ago by news24lor

I still had version 493 when 5.0.0 arrived.

Macports left me on standby with the red upgrade dot and had updated proj to the 5. So I uninstalled the 5 and consequently all the programs compiled with proj 5. I activated the 493, the one with the red dot, and I installed QGIS and QGIS 3 which took proj which was actually the 493 version.

Even today I have compiled gdal with the variants inserted by default (example: spatialite, Mrsid, etc..). Normally asks proj50 but I excluded it with a Macports option and I compiled it with the old 493 without errors.

It is good to leave 4.9.3 for a while as a choice, imho.

Thanks again

Changed 3 years ago by fhanzer (Florian Hanzer)

Attachment: Portfile-proj.diff added

comment:8 Changed 3 years ago by fhanzer (Florian Hanzer)

Until proj 5.0.1 is released, the problem with the shifted coordinates can be solved by installing the RC1 - see attached diff for a Portfile.

comment:9 Changed 3 years ago by Veence (Vincent)

I’d rather not use the RC1 and try to use pros 4.9 with the current 3

comment:10 Changed 3 years ago by Veence (Vincent)

Ok, the problem is this: proj 5 installs its files in ${prefix} (usually /opt/local) and proj47 in ${prefix}/lib/proj49 (/opt/local/lib/proj49/…). But on the compilation line -I/opt/local/include precedes -I/opt/local/lib/proj49/include so the included version is always proj5 one.

In order to be able for proj49 and proj5 to coexist, I have modified proj5 so that it installs in /opt/local/lib/proj5/… instead of /opt/local.

Re-compiling right now

Note: See TracTickets for help on using tickets.