Virtual layer access OGR ODBC problem

Frank Warmerdam warmerdam at POBOX.COM
Tue Oct 10 15:21:36 EDT 2006


Yewondwossen Assefa wrote:
> The useSpatialSubquery='FALSE' seems to do the trick, although I need to 
> do more tests.
>  Not sure if the fields are numeric:
> 
>   * if I do an ogrinfo the Latitude/Longitude is reported as being String
>   * if I do access the db using php and echo the field types, I get 
> Latitude DECIMAL and Longitude DECIMAL

Assefa,

Ah.  I suspect that the ODBC driver is not recognising DECIMAL as a numeric
field type, and so it falls back to treating it as a String.  And now
that I think about it, the extra spatial constraint is being interpreted
within the OGR code for SrcSQL while for a conventional table they are
passed through to the actual ODBC driver which understands DECIMAL properly.

The proper solution likely is fixing the OGR ODBC driver to understand
the decimal field type.  If you could file a bug against OGR listing the
database you are using and the SQL declaration for the field in that database
I can try and get this fixed sooner or later.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org



More information about the mapserver-users mailing list