[mapserver-dev] WMS 1.3 GetFeatureInfo troubles with spatialite

Fabian Schindler fabian.schindler at eox.at
Tue Mar 6 11:55:55 EST 2012


Hi List,

I'm having some troubles getting a GetFeatureRequest running with a 
spatialite DB. It works on a PostGIS backend, but with spatialite I only 
get empty result sets. (Not even the header and footer html templates 
are returned).

I'm using a Python MapScript application where I dynamically create a 
layer, but I managed to reproduce the scenario with a static mapfile[1].

With the request

     mapserv -nv 
QUERY_STRING="map=template.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetFeatureInfo&LAYERS=test&QUERY_LAYERS=test&STYLES=&BBOX=32.158895,-3.75,46.3,28.326165&FEATURE_COUNT=10&HEIGHT=100&WIDTH=200&FORMAT=image%2Fpng&INFO_FORMAT=text/html&CRS=EPSG:4326&I=100&J=50"

I receive the following debug output [2] and an empty HTTP response [3].

With the request:

     mapserv -nv 
QUERY_STRING="map=template.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=test&QUERY_LAYERS=test&STYLES=&BBOX=32.158895,-3.75,46.3,28.326165&FEATURE_COUNT=10&HEIGHT=100&WIDTH=200&FORMAT=image%2Fpng&INFO_FORMAT=text/html&CRS=EPSG:4326&I=100&J=50" 
 > test.png

I'm able to produce a nice image of the polygons within the sqlite file.

Any hints for me?

Thanks,
Fabian


[1]:

        MAP
         CONFIG "MS_ERRORFILE" "stderr"
         DEBUG 5
         WEB
             METADATA
                 "ows_enable_request"                "*"
                 "ows_feature_info_mime_type" "text/html text/xml"
                 "wms_include_items" "text/html text/xml"
             END
         END


     PROJECTION
             "+init=epsg:4326"
     END

     LAYER
             DEBUG 5
             STATUS on
             DUMP true
             TYPE polygon
             NAME test
             DATA "SELECT eomd.id AS oid, eomd.footprint AS geometry, 
cov.coverage_id FROM coverages_eometadatarecord AS eomd, 
coverages_coveragerecord AS cov, coverages_rectifieddatasetrecord AS 
rectd, coverages_datasetseriesrecord_rect_datasets AS ds2rectd WHERE 
ds2rectd.datasetseriesrecord_id = 9 AND 
ds2rectd.rectifieddatasetrecord_id = rectd.coveragerecord_ptr_id AND 
cov.resource_ptr_id = rectd.coveragerecord_ptr_id AND 
rectd.eo_metadata_id = eomd.id  UNION SELECT eomd.id AS oid, 
eomd.footprint AS geometry, cov.coverage_id FROM 
coverages_eometadatarecord AS eomd, coverages_coveragerecord AS cov, 
coverages_referenceabledatasetrecord AS refd, 
coverages_datasetseriesrecord_ref_datasets AS ds2refd WHERE 
ds2refd.datasetseriesrecord_id = 9 AND 
ds2refd.referenceabledatasetrecord_id = refd.coveragerecord_ptr_id AND 
cov.resource_ptr_id = refd.coveragerecord_ptr_id AND refd.eo_metadata_id 
= eomd.id"

             CONNECTION "config.sqlite"
             CONNECTIONTYPE ogr
             PROJECTION
                     "+init=epsg:4326"
             END
             METADATA
                     "wms_srs" "EPSG:4326"
                     "wms_label" "test"
             END
             TEMPLATE "outline_template_dataset.html"
             HEADER "outline_template_header.html"
             FOOTER "outline_template_footer.html"
             CLASS
                     STYLE
                             OUTLINECOLOR 255 0 0
                     END
                     NAME red
             END
             CLASSGROUP red
     END
     END # MAP

[2]

     CGI Request 1 on process 14758
     msWMSLoadGetMapParams(): enabling non-square pixels.
     msOGRFileOpen(config.sqlite)...
     OGROPen(/home/fabian/workspace/test/./config.sqlite)
     msConnPoolRegister(test,config.sqlite,0x86cb50)
     msProjectRect(): some points failed to reproject, doing internal 
sampling.
     msOGRFileWhichShapes: Setting spatial filter to 12.368273 39.158742 
12.368273 39.158742
     msOGRFileNextShape: Returning MS_DONE (no more shapes)
     msOGRLayerClose(config.sqlite).
     msOGRFileClose(/home/fabian/workspace/test/./config.sqlite,-1).
     msConnPoolRelease(test,config.sqlite,0x86cb50)
     msConnPoolClose(config.sqlite,0x86cb50)
     msQueryByPoint(): Search returned no results. No matching record(s) 
found.
     mapserv request processing time (msLoadMap not incl.): 0.007s
     msFreeMap(): freeing map at 0x85aee0.
     freeLayer(): freeing layer at 0x8630c0.


[3]

     Content-type: text/html


More information about the mapserver-dev mailing list