[QGIS-trac] Re: [Quantum GIS] #1165: WFS must follow WMS convention for URL (missing ? or & at end auto supplied)

Quantum GIS qgis at qgis.org
Mon Aug 4 23:48:08 EDT 2008


#1165: WFS must follow WMS convention for URL (missing ? or & at end auto
supplied)
-----------------------------------------------------+----------------------
        Reporter:  LuizDomingues53                   |         Owner:  nobody       
            Type:  bug                               |        Status:  new          
        Priority:  major: does not work as expected  |     Milestone:  Version 1.0.0
       Component:  Vectors                           |       Version:  0.11.0       
      Resolution:                                    |      Keywords:  WFS          
Platform_version:                                    |      Platform:  Windows      
        Must_fix:  Yes                               |   Status_info:  0            
-----------------------------------------------------+----------------------
Comment (by LuizDomingues53):

 WFS should check URL like WMS (code follows)
 {{{
 // from: root/trunk/qgis/src/providers/wms/qgswmsprovider.cpp
 /***************************************************************************
    qgswmsprovider.cpp  -  QGIS Data provider for OGC Web Map Service
 layers
 */
 //***** Lines up to 135 missing **** Follows lines 136 to 154 ****
 //
 // URL can be in 3 forms:
 //     1) http://xxx.xxx.xx/yyy/yyy
 //     2) http://xxx.xxx.xx/yyy/yyy?
 //     3) http://xxx.xxx.xx/yyy/yyy?zzz=www
 //
 // Prepare the URI so that we can later simply append param=value
 //
     if ( !(baseUrl.contains("?")) )
     {
         baseUrl.append("?");
     }
     else if ( (baseUrl.right(1) != "?" )  &&  (baseUrl.right(1) != "&" ) )
     {
         baseUrl.append("&");
     }

 }}}

-- 
Ticket URL: <https://trac.osgeo.org/qgis/ticket/1165#comment:1>
Quantum GIS <http://qgis.org>
Quantum GIS is an Open Source GIS viewer/editor supporting OGR, PostGIS, and GRASS formats


More information about the QGIS-trac mailing list