3liz/py-qgis-wps

The output project has no CRS

rldhont opened this issue · 3 comments

In old QGIS, before 3.16, projects have a default CRS. With QGIS 3.16 and upper, projects can have no CRS. For QGIS Server, the project has to have a CRS, but the project build by WPS has no CRS.

To fix it, py-qgis-wps can set the project CRS with the project used to perform the processes.

I ran into the same issue yesterday and had a short look at it.
Do you already have an idea where to fix this problem?

Would it be possible to add a default CRS (like EPSG:4326) in the config.py file under Qgis project settings?

# Qgis settings
#
# Add other Qgis settings
#
# XXX Not functional yet
CONFIG.add_section('qgis.settings')
#
# Qgis projects
#
CONFIG.add_section('qgis.projects')
# Set this to force the the advertised WMS url in the Qgis projects
# created by pyqgiswps
CONFIG.set('qgis.projects', 'wmsurl', getenv('QGSWPS_ADVERTISED_WMSURL','${server:wms_service_url}'))

I'm relatively new to this whole project so there might be things I've missed or just don't understand jet.

Would it be possible to add a default CRS (like EPSG:4326) in the config.py file under Qgis project settings?

There is no need for that: the project created must have the same CRS as the source project

Fixed in e6226cc