[mapserver-users] OGR to MySQL
Chris Green
chris.green at ibstv.co.uk
Tue Jul 26 03:57:23 PDT 2011
Hi users
I'm having some trouble with an OGR connection to a MySQL database. The data
I'm trying to access was created using QGIS as a line layer and saved in a
MySQL table as a BLOB in a geometry column. I can access and properly
display this line data using QGIS, but not so far via Mapserver - nothing is
drawn and I can't see any error.
I am using Mapserver 6.0 and my mapfile is very similar to the example in
theMapserver / MYSQL documentation:
LAYER
NAME "testLine"
TYPE LINE
STATUS DEFAULT
CONNECTIONTYPE OGR
CONNECTION "mysql:testDB,user=admin,password=password,port=3306"
DATA "SELECT Geometry from testLine"
CLASS
STYLE
COLOR 0 0 0
WIDTH 2
END # style
END # class
END # layer
If I look at the MySQL table using OGRinfo I see the following:
Layer name: testLine
Geometry: Unknown (any)
Feature Count: 0
Layer SRS WKT:
(unknown)
FID Coumn = id
Geometry Column = Geometry
The issue seems to be that OGRInfo and therefore MapServer does not
recognise any features in the table, but QGIS using access to the same table
finds and displays the features.
Anyone have any ideas what I am doing wrong?
Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110726/2dae662b/attachment.htm>
More information about the MapServer-users
mailing list