Opened 14 years ago
Last modified 12 years ago
#3229 new enhancement
Mapserver should read column types from the database
Reported by: | bartvde | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: |
Description
Currently when you have a string column with integer values, queries will go wrong.
[Thu Dec 10 13:39:20 2009] [error] [client 145.50.90.204] msOracleSpatialLayerWhichShapes(): OracleSpatial error. Error: ORA-01722: invalid number, referer: http://test.intranet.rijkswaterstaat.nl/apps/geoservices/mapviewer3/ [Thu Dec 10 13:39:20 2009] [error] [client 145.50.90.204] . Query statement: SELECT OBJECTID, EERSTE_GWT, CYFER, SHAPE FROM BODEM.BODEMKAART50 WHERE ( (CYFER= 23) ) AND SDO_FILTER( SHAPE, MDSYS.SDO_GEOMETRY(2003, :srid, NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') = 'TRUE' . Check your data statement., referer: http://test.intranet.rijkswaterstaat.nl/apps/geoservices/mapviewer3/
There is a workaround, see ticket:3052 but ideally this should be handled automatically.
Note:
See TracTickets
for help on using tickets.
Another workaround is to set gml_[item_name]_type metadata for the column in question. This worked for me on PostGIS with MS 6.0.1, when I saw this error:
msDrawMap(): Image handling error. Failed to draw layer named '5'.
msPostGISLayerWhichShapes(): Query error. Error (ERROR: operator does not exist: character = integer
LINE 1: ...v','surfaceproperty')) and (( ("landsejerlavskode"= 2000155)...
My Map file:
END