[mapserver-users] Mapserver projection, auto and extent
Jeff McKenna
jmckenna at gatewaygeomatics.com
Thu May 19 07:10:11 PDT 2022
Hi Trygve,
You can examine the problem QGIS GetMap request closely, through the
Network Logger (it's really a saviour)
https://github.com/mapserver/mapserver/wiki/Get-the-Raw-WMS-Request-Generated-by-QGIS
Then you can go back to review the trusty WMS Server document, and make
sure you have set the required metadata:
https://mapserver.org/ogc/wms_server.html
(which also means to remove all warnings from your GetCapabilities response)
But that QGIS network logger is your lifeline :)
Hope that gets you started,
PS. I never use 'auto', ever, never, it's my own rule and that's how I
keep my sanity and avoid these issues, ha. But others like it. I only
speak for myself here.
-jeff
--
Jeff McKenna
GatewayGeo: Developers of MS4W, MapServer Consulting and Training
co-founder of FOSS4G
http://gatewaygeo.com/
On 2022-05-19 10:26 a.m., Trygve Aspenes wrote:
> Hi
>
> I got a geotiff raster with a projection which is not an EPSG code, so
> in the mapfile I use AUTO in the layer projection. This also means I
> skip the extent and projection in map level in the mapfile. In one
> client this works fine ( this client request epsg:3857 and this looks
> fine to me)
>
> But in QGIS, this does not work nor any other projections.
>
> Then I add EXTENT and PROJECTION in my mapfile like this:
> MAP
> ....
> EXTENT -56.6378419 31.5007307 95.025531 84.6828537
> PROJECTION
> "init=epsg:4326"
> END
> ....
> END
>
> And then EPSG:4326 works in QGIS also. But if I try to change the
> projection i qgis, eg to EPSG:3857, this does not work in QGIS, even if
> it still work in my other client.
>
> So what is it that I don't understand about EXTENT and PROJECTION. I
> have looked at the documentation
> https://mapserver.org/mapfile/projection.html#important-notes and and as
> far as I can understand from the second bullet point the projection
> definition at map level can be looked as the outgoing projection with
> the extent accordingly.
>
> What do I need to do to make QGIS be able to use other projections as well?
>
> I do have a link to my getcapabilities document, but hesitates to put it
> here.
>
> Trygve Aspenes
More information about the MapServer-users
mailing list