[mapserver-users] getfeatureinfo problems

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Fri Jun 26 06:10:12 PDT 2009


Hi,

Mapserver needs an integer type column for the USING UNIQUE clause, not 
a string column. That won't work.

Best regards,
Bart

DeDuikertjes wrote:
> Jukka,
>
> Thank you, I've tried the SQL statement:
>
> DECLARE mycursor BINARY CURSOR FOR SELECT 
> asbinary(force_collection(force_2d(tc_vlak_geometry)),'NDR'),geoidn::text 
> from "NL.IMRO.0026.SVBBU-0001" WHERE 
> (geoidn='geoidNL.IMRO.0026.SVBBU-0001') and (tc_vlak_geometry && 
> setSRID( 'BOX3D(155984.407968748 468982.233317728,156024.590926508 
> 469022.416275488)'::BOX3D,28992) )
>
> with the first DECLARE part omitted, so:
> SELECT 
> asbinary(force_collection(force_2d(tc_vlak_geometry)),'NDR'),geoidn::text 
> from "NL.IMRO.0026.SVBBU-0001" WHERE 
> (geoidn='geoidNL.IMRO.0026.SVBBU-0001') and (tc_vlak_geometry && 
> setSRID( 'BOX3D(155984.407968748 468982.233317728,156024.590926508 
> 469022.416275488)'::BOX3D,28992) )
>
> This returns two rows.
> I've tried
> SELECT 
> "geoidn"::text,"idealisatie"::text,"tc_multi_geometry"::text,"tc_lijn_geometry"::text,"tc_punt_geometry"::text,asbinary(force_collection(force_2d(tc_vlak_geometry)),'NDR') 
> from "NL.IMRO.0026.SVBBU-0001" WHERE geoidn = 0
>
> also, which returns 0 rows.
> This is as expected from this query as it asks for WHERE geoidn = 0
> geoidn never is 0.
>
> Why does mapserver come to this query? I've never asked for geidn to 
> be zero!
> If I remove the WHERE geoidn = 0 I get a result for all the layers on 
> the point (all the layers in fact).
> Somehow this WHERE geoidn = 0 condition is constructed false. Ist 
> should be something like WHERE geoidn = geoidNL.IMRO.0026.SVBBU-0001
>
> I've not a clue where that wrong query clause comes from.
>
> MArco
> P.S. In earlier attempts I've renamed the tables with identical results.
>
>
>
>
> Rahkonen Jukka schreef:
>> Hi,
>>
>> Have you tried to run the SQL queries from logfile directly?  I 
>> wonder if for example this part is correct and finds any data:
>>
>>  WHERE (geoidn='geoidNL.IMRO.0026.SVBBU-0001') and (tc_vlak_geometry 
>> && setSRID( 'BOX3D(155984.407968748 468982.233317728,156024.590926508 
>> 469022.416275488)'::BOX3D,28992) )
>>
>> Just a guess, but perhaps odd table name makes some trouble.  How 
>> about reneming or copying the table temporarily to something wiht 
>> more simple name, like "test"?
>>
>> -Jukka Rahkonen-
>>
>>
>>
>>
>> DeDuikertjes wrote:
>>
>> Dear list,
>>
>> yesterday I reported problems with my WFS server. I could not fix 
>> that up till now.
>>
>> I have another possibly related problem.
>> My WMS is set up allright, getcapabilities is ok, I can see the map, 
>> pan zoom, etc, no problems.
>>
>> When I do an Identify (GetFeatureInfo request), I get back an 
>> exception-report, with no items in (so essentially an ampty exception 
>> report).
>> The query just doesn't seem to find the data.
>> Clicking inside a feature and outside does differ (outside doesn't 
>> give an exception report).
>>
>> I've enabled debugging and this is the output when I do a 
>> GetFeatureInfo request:
>>
>> [Fri Jun 26 13:21:11 2009].498623 CGI Request 1 on process 1525
>> [Fri Jun 26 13:21:11 2009].518710 msPOSTGISLayerOpen called 
>> datastatement: tc_vlak_geometry from "NL.IMRO.0026.SVBBU-0001" using 
>> unique geoidn using srid=28992
>> [Fri Jun 26 13:21:11 2009].518735 MSPOSTGISLayerOpen -- shared 
>> connection not available.
>> [Fri Jun 26 13:21:11 2009].523422 
>> msConnPoolRegister(geoidNL.IMRO.0026.SVBBU-0001_vlak,host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>> [Fri Jun 26 13:21:11 2009].523453 msPOSTGISLayerFreeItemInfo called
>> [Fri Jun 26 13:21:11 2009].523466 msPOSTGISLayerWhichShapes called
>> [Fri Jun 26 13:21:11 2009].523490 msPOSTGISLayerParseData: unique 
>> column = geoidn, srid='28992', geom_column_name = tc_vlak_geometry, 
>> table_name="NL.IMRO.0026.SVBBU-0001"
>> [Fri Jun 26 13:21:11 2009].523796 query_string_0_6:DECLARE mycursor 
>> BINARY CURSOR FOR SELECT 
>> asbinary(force_collection(force_2d(tc_vlak_geometry)),'NDR'),geoidn::text 
>> from "NL.IMRO.0026.SVBBU-0001" WHERE 
>> (geoidn='geoidNL.IMRO.0026.SVBBU-0001') and (tc_vlak_geometry && 
>> setSRID( 'BOX3D(155984.407968748 468982.233317728,156024.590926508 
>> 469022.416275488)'::BOX3D,28992) )
>> [Fri Jun 26 13:21:11 2009].535912 msPOSTGISLayerFreeItemInfo called
>> [Fri Jun 26 13:21:11 2009].535925 msPOSTGISLayerClose datastatement: 
>> tc_vlak_geometry from "NL.IMRO.0026.SVBBU-0001" using unique geoidn 
>> using srid=28992
>> [Fri Jun 26 13:21:11 2009].535931 msPOSTGISLayerClose -- closing 
>> query_result
>> [Fri Jun 26 13:21:11 2009].536007 
>> msConnPoolRelease(geoidNL.IMRO.0026.SVBBU-0001_vlak,host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>> [Fri Jun 26 13:21:11 2009].536017 msConnPoolClose(host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>> [Fri Jun 26 13:21:11 2009].538905 msPOSTGISLayerOpen called 
>> datastatement: tc_vlak_geometry from "NL.IMRO.0026.SVBBU-0001" using 
>> unique geoidn using srid=28992
>> [Fri Jun 26 13:21:11 2009].538914 MSPOSTGISLayerOpen -- shared 
>> connection not available.
>> [Fri Jun 26 13:21:11 2009].543298 
>> msConnPoolRegister(geoidNL.IMRO.0026.SVBBU-0001_vlak,host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>> [Fri Jun 26 13:21:11 2009].543314 msPOSTGISLayerFreeItemInfo called
>> [Fri Jun 26 13:21:11 2009].543319 in msPOSTGISLayerGetItems  (find 
>> column names)
>> [Fri Jun 26 13:21:11 2009].543329 msPOSTGISLayerParseData: unique 
>> column = geoidn, srid='28992', geom_column_name = tc_vlak_geometry, 
>> table_name="NL.IMRO.0026.SVBBU-0001"
>> [Fri Jun 26 13:21:11 2009].545217 msPOSTGISLayerInitItemInfo called
>> [Fri Jun 26 13:21:11 2009].545230 msPOSTGISLayerGetShape called for 
>> record = 0
>> [Fri Jun 26 13:21:11 2009].545239 msPOSTGISLayerParseData: unique 
>> column = geoidn, srid='28992', geom_column_name = tc_vlak_geometry, 
>> table_name="NL.IMRO.0026.SVBBU-0001"
>> [Fri Jun 26 13:21:11 2009].545253 msPOSTGISLayerGetShape: DECLARE 
>> mycursor2 BINARY CURSOR FOR SELECT 
>> "geoidn"::text,"idealisatie"::text,"tc_multi_geometry"::text,"tc_lijn_geometry"::text,"tc_punt_geometry"::text,asbinary(force_collection(force_2d(tc_vlak_geometry)),'NDR') 
>> from "NL.IMRO.0026.SVBBU-0001" WHERE geoidn = 0 [Fri Jun 26 13:21:11 
>> 2009].547105 msFreeMap(): freeing map at 0x943d518.
>> [Fri Jun 26 13:21:11 2009].547114 msPOSTGISLayerClose datastatement: 
>> tc_vlak_geometry from "NL.IMRO.0026.SVBBU-0001" using unique geoidn 
>> using srid=28992
>> [Fri Jun 26 13:21:11 2009].547119 msPOSTGISLayerClose -- query_result 
>> is NULL
>> [Fri Jun 26 13:21:11 2009].547124 
>> msConnPoolRelease(geoidNL.IMRO.0026.SVBBU-0001_vlak,host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>>
>>
>> Just as with the WFS problem, there is no data returning. The WFS 
>> does show the exposed columns, never any data in.
>> I've not a clue of how to proceed, or how to get extra debug info.
>> Please help !
>>
>> MArco
>> [Fri Jun 26 13:21:11 2009].547132 msConnPoolClose(host=localhost 
>> user=tc_check dbname=80.101.100.35,0x9457b38)
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
>>
>>   
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the MapServer-users mailing list