MySQL and mapfile

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Tue Apr 5 12:11:54 EDT 2005


Don Deskins wrote:
> 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).

Shapefiles are very fast if they are set up correctly and indexed. You
would be wise to understand and resolve the performance issues before
moving the data to mysql as it is not likely to be faster.

For example do all you shapefiles have *.qix file?
How is your mapfile structured? Are you trying to draw too much detail
at larger zoom values?

When is it slow? Zoomed in or zoomed out or both. If we had some more
information we might be able to help you resolve the performance issues.

Understanding these issues might also help you when you get the data
loaded into mygis.

-Steve W.

> 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