MySQL and mapfile
Don Deskins
dldeskins at GMAIL.COM
Tue Apr 5 11:23:03 PDT 2005
Steve,
Thank you very much for your reply. I am sorry to say that I didn't
know there was a ".qix" file. With my database background, I assumed
that an indexed database field would be faster than a flat file. Of
course, that is correct if the flat file is not index. I searched
through the archives and found out what a .qix file was all about. I
created one for each of my shapes and sped up download time by 50%.
Now on to tiling the shp files :)
Thanks again
On Apr 5, 2005 12:11 PM, Stephen Woodbridge <woodbri at swoodbridge.com> wrote:
> 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
> >
>
>
--
Don Deskins
More information about the MapServer-users
mailing list