ogrinfo show x y columns as strings

Richard Duivenvoorde rdmailings at DUIF.NET
Fri May 6 08:42:53 EDT 2005


Hi list,

I have the following txt file that I want to use as a virtual datasource:

text,x,y
test,10,10
test2,11,11


Using a ODBC connection in Windows everything works fine:

ogrinfo ODBC:puntenlaagdsn testpoints.txt
INFO: Open of `ODBC:puntenlaagdsn'
using driver `ODBC' successful.

Layer name: testpoints.txt
Geometry: Unknown (any)
Feature Count: 2
Layer SRS WKT:
(unknown)
text: String (255.0)
x: Integer (10.0)
y: Integer (10.0)
OGRFeature(testpoints.txt):0
 text (String) = test
 x (Integer) = 10
 y (Integer) = 10

OGRFeature(testpoints.txt):1
 text (String) = test2
 x (Integer) = 11
 y (Integer) = 11



But putting everything to linux fails, because ogr(info) (with exactly
the same txt file) reports the x y columns as strings, giving a
featurecount of zero => no features on the map :-(

ogrinfo -ro -al ODBC:@puntenlaagdsn testpoints.txt
INFO: Open of `ODBC:@puntenlaagdsn'
using driver `ODBC' successful.

Layer name: testpoints.txt
Geometry: Unknown (any)
Feature Count: 0
Layer SRS WKT:
(unknown)
text: String (255.0)
x: String (255.0)
y: String (255.0)


Does anybody knows what's the problem?

Is it an odbc problem?

Who is responsible for 'typing' the columns in the txt file?

TIA

Richard



More information about the mapserver-users mailing list