MySQL and mapfile

Don Deskins dldeskins at GMAIL.COM
Tue Apr 5 08:41:37 PDT 2005


Hello,

Again, I am new to mapserver.  I have finally gotten my map to display
properly but it is very slow, so I am interested in getting all of the data
into a database (MySQL).

I have data (in .shp, .dbf, and .shx files) that I have converted using
mygisimport.  This produce an sql file which I imported into the MySql db.
I am now having trouble accessing this data with the mapfile.  Here is what
I have:

  LAYER
    NAME "SCAP_Cert2004_ParcelsUTM16M"
    CONNECTIONTYPE mygis
    CONNECTION "host:user:password:db:bin:"
    #geo is the name of the column
    DATA "geo from Parcels feature"
    STATUS ON
    TYPE POLYGON
    CLASS
      OUTLINECOLOR 255 0 0
      TEMPLATE "template.html"
    END
    MAXSCALE 40000
    TOLERANCE 0
    TOLERANCEUNITS PIXELS
  END

I get the following error:

Warning: [MapServer Error]: SELECT feature.id, feature.vertices,
geometry.WKB_GEOMETRY from bad mysql query : bad mysql query in <filepath
and name> on line 217

Can anyone help with this?

BTW, I tried to use shp2mysql.pl, but got several failures.

Thanks,

Don



More information about the MapServer-users mailing list