3

On GeoServer I have published a layer in custom projection I called it EPSG:60900. When I open this layer in Leaflet or OpenLayers it's works fine. In GeoServer log I see that client sends requests in my projection:

Request: getMap
    Time = []
    Buffer = 0
    Format = image/png
    Filter = null
    Filters = null
    Height = 752
    Width = 768
    RemoteOwsType = null
    RemoteOwsURL = null
    FormatOptions = {}
    CQLFilter = null
    Elevation = []
    FeatureId = null
    StartIndex = null
    ViewParams = null
    Palette = null
    Tiled = false
    SRS = EPSG:60900
    FeatureVersion = null
    Styles = [StyleImpl[ name=line]]
    Layers = [org.geoserver.wms.MapLayerInfo@2d3b64a0]
    MaxFeatures = null

Now I want to open this WMS layer in QGIS. At first I add SRS definition in QGIS. And open my layer. And here a problem. In moment where I add WMS layer QGIS does not allow me set custom SRS to layer, so I choose Mercator.

enter image description here

After in layer properties I set layer and project SRS as my custom coordinate system.

enter image description here

But QGIS sends request in another SRS:

 Request: getMap
    Time = []
    Buffer = 0
    Format = image/png
    Filter = null
    Filters = null
    Height = 1195
    Width = 1236
    RemoteOwsType = null
    RemoteOwsURL = null
    FormatOptions = {DPI=96}
    CQLFilter = null
    Elevation = []
    FeatureId = null
    StartIndex = null
    ViewParams = null
    Palette = null
    Tiled = false
    SRS = urn:x-ogc:def:crs:EPSG:3857
    FeatureVersion = null
    Styles = [StyleImpl[ name=line]]
    Layers = [org.geoserver.wms.MapLayerInfo@2d3b64a0]
    MaxFeatures = null

What can be wrong?

6
  • Since you told QGIS to use 3857 it will - the issue seems to be why the WMS dialog won't let you set a custom SRS
    – Ian Turton
    Nov 24, 2017 at 9:54
  • @IanTurton yaeh, i don't understand this moment. I added my custom srs in QGIS interface, maybe i gonna do something more with srs?
    – Kliver Max
    Nov 24, 2017 at 10:15
  • It seems that QGIS doesn't look at the available CRS list from the WMS to determine what is available or just assumes that none of the user projections will be available,
    – Ian Turton
    Nov 24, 2017 at 10:35
  • The first thing to do is te read the GetCapabilities from you WMS and check if EPSG:60900 is on the of supported coordinate systems. If it is then everything should be OK on the WMS server side.
    – user30184
    Nov 24, 2017 at 11:27
  • The local coordinate system is not EPSG:60900 but USER:100000
    – JGH
    Nov 24, 2017 at 13:24

1 Answer 1

0

I found answer. I did all wrong with projections in QGIS. In interface i can add USER projection and when QGIS works with WMS it do not search in user projections projection with needed EPSG code.
If i want to work with WMS in custom projection in gonna edit QGIS 2.18\apps\qgis\resources\srs file and add my custom projection. After this QGIS allow to use custom projection in WMS.
Here is more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.