WMS from MGOS can't be read by QGIS

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

WMS from MGOS can't be read by QGIS

Znarf1965
I have a problem on reading WMS published from MGOS.
I have a very simple service on a basic SHP layer with EPSG:21781 and EPSG:4326.
I define a layer as queryable and if I try to open in QGIS I can see my layer in the list (GetCapabilities seems working properly), but if I add layer to map I get an error.
But if I try to read this service from Autodesk Map3D, it works properly.

This is layer row header:

<?xml version="1.0"?>
<ResourceDocumentHeader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xsi:noNamespaceSchemaLocation="ResourceDocumentHeader-1.0.0.xsd">
  <General>
    <IconName>LayerDefinitionVector</IconName>
  </General>
  <Security>
    <Inherited>true</Inherited>
  </Security>
  <Metadata>
    <Simple>
      <Property>
        <Name>_Opaque</Name>
        <Value>0</Value>
      </Property>
      <Property>
        <Name>_IsPublished</Name>
        <Value>1</Value>
      </Property>
      <Property>
        <Name>_Bounds</Name>
        <Value><Bounds SRS="EPSG:4326" west="8.371" south="45.825" east="9.174" north="46.629" /> <Bounds SRS="EPSG:21781" west="672484.296" south="75272.190" east="732910.616" north="165700.540" /></Value>
      </Property>
      <Property>
        <Name>_Title</Name>
        <Value>LayerDefinitionSHPComuni</Value>
      </Property>
      <Property>
        <Name>_Queryable</Name>
        <Value>1</Value>
      </Property>
    </Simple>
  </Metadata>
</ResourceDocumentHeader>


From QGIS
1) I connect to http://localhost/mapserver2013/mapagent/mapagent.fcgi 
2) set coordinate system to CH1903/LV03
3) add to map

Then I get this error

Response: <?xml version="1.0" encoding="UTF-8" ?>

<ServiceExceptionReport version="1.3.0"
   xmlns="http://www.opengis.net/ogc"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
 <ServiceException code="InternalError">
  Unexpected exception was thrown.  No additional details available.
 </ServiceException>
</ServiceExceptionReport>


Anybody has any idea about what's wrong?...
Reply | Threaded
Open this post in threaded view
|

Re: WMS from MGOS can't be read by QGIS

Znarf1965
I've just tried to read this service from Mapinfo MapXtreme and Esri ArcGis. They both can't read it.
It seems that only Autodesk Map3D can read WMS from Mapguide.

Anybody can help me?...
Reply | Threaded
Open this post in threaded view
|

Re: WMS from MGOS can't be read by QGIS

Znarf1965
The layer I would like to expose to WMS is
WMS-WFS/Common/Layers/LayerDefinitionSHPComuni.LayerDefinitionWMS-WFS.mgp
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Rémy Gourrat
In reply to this post by Znarf1965

Hi,

 

I have a mapguide 2.2 on windows 7 iis 7 64bist, Oracle DataSource with WMS service. It’s running ok.

 

I can read the WMS Service on : Mapinfo 10.5, QGisLisboa 1.8, Autopcad Map 2012, ArcGis Editor 10

 

When you add the layer in Qgis, have you try to choose the right SRS in Qgis for your new layer ?

 

Have you restart MapGuide and iis ?

 

I get the first time wms  run capricious…

 

Have you try to delete in the raw header the EPSG:4326 and his bounds ?

 

Good luck

 

Rémy

De : Franz1965 [via OSGeo.org] [mailto:ml-node+[hidden email]]
Envoyé : vendredi 25 janvier 2013 12:41
À : Rémy GOURRAT
Objet : Re: WMS from MGOS can't be read by QGIS

 

I've just tried to read this service from Mapinfo MapXtreme and Esri ArcGis. They both can't read it.
It seems that only Autodesk Map3D can read WMS from Mapguide.

Anybody can help me?...


If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.n6.nabble.com/WMS-from-MGOS-can-t-be-read-by-QGIS-tp5029828p5029842.html

To start a new topic under MapGuide Users, email [hidden email]
To unsubscribe from MapGuide Users,
click here.
NAML

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Znarf1965
Hi Rémy,

Thanks for answer.

I'm around this problem from a week, with many shutdown/startup.

I think that there is some bug in Mapguide 2.4...

If I don't include in raw header EPSG:4326, then I get in capabilities (REQUEST=GetCapabilities) a layer definition without EX_GeographicBoundingBox and QGis 1.8.0 Lisboa returns an error on BBOX 0,0,0,0. So I can't read with QGis. If I try to read from Map3D I get an undefined error.

If I include both EPSG in raw header (4326 and 21781) I can read from Map3D, so it is better. But in QGis I have a different error with an undefined message, as describbed in my first post. This happens for both EPSG.

Very frustrating  :-( ...

Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Rémy Gourrat

Have you try to inspect qgis wms query with Fiddler ?

 

You just put “use proxy on qgis” with 127.0.0.1:8888

 

I don’t know WMS Version of Mg 2.4

 

But for MGOS 2.2 is 1.1, ty to add version=1.1 behind your URL like under Map

 

De : Franz1965 [via OSGeo.org] [mailto:ml-node+[hidden email]]
Envoyé : vendredi 25 janvier 2013 16:22
À : Rémy GOURRAT
Objet : RE: WMS from MGOS can't be read by QGIS

 

Hi Rémy,

Thanks for answer.

I'm around this problem from a week, with many shutdown/startup.

I think that there is some bug in Mapguide 2.4...

If I don't include in raw header EPSG:4326, then I get in capabilities (REQUEST=GetCapabilities) a layer definition without EX_GeographicBoundingBox and QGis 1.8.0 Lisboa returns an error on BBOX 0,0,0,0. So I can't read with QGis. If I try to read from Map3D I get an undefined error.

If I include both EPSG in raw header (4326 and 21781) I can read from Map3D, so it is better. But in QGis I have a different error with an undefined message, as describbed in my first post. This happens for both EPSG.

Very frustrating  :-( ...



If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.n6.nabble.com/WMS-from-MGOS-can-t-be-read-by-QGIS-tp5029828p5029886.html

To start a new topic under MapGuide Users, email [hidden email]
To unsubscribe from MapGuide Users, click here.
NAML

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Znarf1965
Rémy Gourrat wrote
Have you try to inspect qgis wms query with Fiddler ?
Hi Rémy,

great suggestion! Fiddler with QGis is very interesting, something new I've learned today, good :).

I've done what you've suggeted and I've got the following:

When QGis execute:

http://localhost/mapserver2013/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1

I get:

<?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
        <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport>

If I change version to 1.1:  

http://localhost/mapserver2013/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.1&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1
 
<?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.0.0">
        <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport> 

The result is more or less the same :(
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Rémy Gourrat

Hum…

 

1 question :

-          Have you tried to consume wms service on a sheboygan layer ? In general it’s running first and easy…

 

2 remarks because i don’t have any idea… :

 

-          I see in you URL mapserver2013, you are sure that it’s MapGuide Open Source ? it’s not Autoudesk Infrastructure MapServer ? if yes have you installed your MapGuide OSE on AIMS  ?

 

-          When you ask VERSION=1.3.0 in your URL you have ServiceExceptionReport version="1.3.0" but when you ask VERSION=1.1, mapguide  return ServiceExceptionReport version="1.0.0"

 

Can you send a clipboard of your wms config panel under mapguide/mapadmin/login.php ?

 

Rémy

 

De : Franz1965 [via OSGeo.org] [mailto:ml-node+[hidden email]]
Envoyé : vendredi 25 j
anvier 2013 17:26
À : Rémy GOURRAT
Objet : RE: WMS from MGOS can't be read by QGIS

 

Rémy Gourrat wrote

Have you try to inspect qgis wms query with Fiddler ?

Hi Rémy,

great suggestion! Fiddler with QGis is very interesting, something new I've learned today, good :).

I've done what you've suggeted and I've got the following:

When QGis execute:

http://localhost/mapserver2013/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1

I get:

<?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
        <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport>

If I change version to 1.1:  

http://localhost/mapserver2013/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.1&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1
 
<?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.0.0">
        <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport> 

The result is more or less the same :(


If you reply to this email, your message will be added to the discussion below:

http://osgeo-org.1560.n6.nabble.com/WMS-from-MGOS-can-t-be-read-by-QGIS-tp5029828p5029907.html

To start a new topic under MapGuide Users, email [hidden email]
To unsubscribe from MapGuide Users, click here.
NAML

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Znarf1965
Rémy Gourrat wrote
Have you tried to consume wms service on a sheboygan layer ? In general it’s running first and easy…
At the moment I haven't this sample. I will install it and test...

Rémy Gourrat wrote
I see in you URL mapserver2013, you are sure that it’s MapGuide Open Source ? it’s not Autoudesk Infrastructure MapServer ? if yes have you installed your MapGuide OSE on AIMS  ?
Yes, this is AIMS. I'm doing the same test (with the same results) on:
- server 2008 / MGOS
- virtual machine Windows 7 64 bit MGOS
- virtual machine Windows 7 64 bit AIMS

Your test comes from AIMS, but I get the same result from my MGOS server:

http://213.133.229.149/mapguide/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1

  <?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/ogc http://schemas.opengis.net/wms/1.3.0/exceptions_1_3_0.xsd">
  <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport>
 
http://213.133.229.149/mapguide/mapagent/mapagent.fcgi?SERVICE=WMS&VERSION=1.1&REQUEST=GetMap&BBOX=671401.028954,75246.995246,734864.771170,165663.792311&CRS=EPSG:21781&WIDTH=32&HEIGHT=32&LAYERS=WMS-WFS/Common/Layers/LayerDefinitionSHPComuni&STYLES=&FORMAT=image/png&TRANSPARENT=TRUE HTTP/1.1

  <?xml version="1.0" encoding="UTF-8" ?>
- <ServiceExceptionReport version="1.0.0">
  <ServiceException code="InternalError">Unexpected exception was thrown. No additional details available.</ServiceException> 
  </ServiceExceptionReport> 

wms_config.png
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Znarf1965
Just a note to tell that Sheboygan project works properly.
I suspect that the problem is related to coordinates transformations inside MGOS/AIMS.
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Rémy Gourrat
In reply to this post by Znarf1965

1/ I have seen in your config panel  for the server name => 213.133.229.149:80 just after you call from Qgis with this domain => localhost:80

 

On my PC dev I try to be coherent if I put “localhost:80” in the config I call with localhost, if I put “213.133.229.149:80” in config I call “213.133.229.149”

 

I remember have some issues with this…

 

 

2/ I remember this precious information about MapGuide 2.2 (True under 2.4 ?) I have seen on the Web :

 

Open the file C:\Program Files\OSGeo\MapGuide\Server\Wms\OgcWmsService.config.awd

 

And fin this section, it’s too funny for you !! You speak about 21781 isn’it ?

 

Near the end of file Check that you have this section :

 

<!-- This definition allows a site to override the behavior of -->

 <!-- the SRS= parameter of requests.                           -->

 <!-- Add translate elements here to map any particularly       -->

 <!-- troublesome SRS to some appropriate WKT.                  -->

 <Define item="SRS.WKT.map">

  <!-- This example fixes a problem with EPSG:21781 not

       finding the WKT for EPSG:21781 in the CS library.

  -->

  <translate from="EPSG:21781">PROJCS["CH1903.LV03/01",GEOGCS["LLCH1903",DATUM["CH-1903",SPHEROID["BESSEL",6377397.155,299.15281535],TOWGS84[660.0770,13.5510,369.3440,0.804816,0.577692,0.952236,5.66000000]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Swiss_Oblique_Cylindrical"],PARAMETER["false_easting",600000.000],PARAMETER["false_northing",200000.000],PARAMETER["latitude_of_origin",46.95240555555556],PARAMETER["central_meridian",7.43958333333333],UNIT["Meter",1.00000000000000]]</translate>

 

Follow this link ; http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=11768491&linkID=9242178

 

3/ Clean the second EPSG:4326

 

I don’t enjoy that you put another time the EPSG:4326 in you raw header layer, delete it ! you don’t need. Look below we have 2 EPSG:4326 under Qgis with your wms layer not secure

 

 

 

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

RE: WMS from MGOS can't be read by QGIS

Znarf1965
Hi Rémy,

thanks again for your support.

here some answers...

Point 1: I make tests on MGOS on a remote server and on a local AIMS. On Qgis I use localhost for local AIMS (configured himsel as localhost) and I use IP for remote server (configured himself with his IP)

Point 2: yes, I already know and I've already played with it with no success. I don't think the problem is here.

Point 3: I can't clear EPSG:4326. If I do, then QGis give me an error on BBOX=0,0,0,0. This happens because without EPSG:4326 in row header, AIMS/MGOS returns capabilities without tag "EX_GeographicBoundingBox". I think that this is a very important xml tag for QGis, I will explain you later why.

I discovered the following interesting thing by use of fiddler on QGis and on Map3D.

Here capabilities for the layer:


- <Layer>
  <Title>Infrastructure Map Server - Web Map Service</Title> 
  <CRS>EPSG:4326</CRS> 
-  
- <Layer queryable="0" cascaded="0" noSubsets="0" opaque="0">
  <Name>WMS-WFS/Common/Layers/LayerDefinitionSHPComuni</Name> 
  <Title>LayerDefinitionSHPComuni</Title> 
  <CRS>EPSG:4326</CRS> 
  <CRS>EPSG:21781</CRS> 
+ <EX_GeographicBoundingBox>
  <westBoundLongitude>8.371</westBoundLongitude> 
  <eastBoundLongitude>9.174</eastBoundLongitude> 
  <southBoundLatitude>45.825</southBoundLatitude> 
  <northBoundLatitude>46.629</northBoundLatitude> 
  </EX_GeographicBoundingBox>
  <BoundingBox CRS="EPSG:4326" minx="8.371" miny="45.825" maxx="9.174" maxy="46.629" /> 
  <BoundingBox CRS="EPSG:21781" minx="672480" miny="75270" maxx="732911" maxy="165701" /> 
  </Layer>
  </Layer>
  </Capability>


Map3D build BBOX values getting them from BoundingBox CRS="EPSG:21781" and it works.

QGis assign BBOX values with an extention a bit wider, getting values from EX_GeographicBoundingBox (from capabilities) and transforming in something very closed to this but a bit wider, only a bit: in that case AIMS/MGOS returns an error without message. If I get QGis request (got from fiddler) and replace BBOX with values from BoundingBox CRS="EPSG:21781" (from capabilities), then it works fine.

Conclusion: AIMS/MGOS works with BBOX equal or shorter than what expressed in GetCapabilities values. BBOX with values outside generate an error.

I think that this is a bug. With this limitation a wide range of WMS client will not work.