sg

Salı, Aralık 20, 2005

Re: Turning from flat files to MySQL



On 12/20/05, Chris Hunt <chris@leicesteryha.org.uk> wrote:

"It's just a bit weird that everyone seems to be answering questions
that I
haven't asked, and are missing the one that I do need help with."

The problem is, you're asking the wrong question :-)

Yup, the other answers have certainly helped, so my curt reply was probably a little unwarranted!


You don't need to change your javascript code at all (well, hardly at
all). It doesn't care whether the gpx file it processes is a flat file,
comes from a database, or is keyed in on demand by a team of magic
elves. All it knows is that it requests a URL and gets a gpx file
returned to it.

I've just figured that out and now have the MySQL database working. I originally thought I'd have to find a different command, but nope just a small change and all is well.


Frankly, I do see any particular benefit in using a database, if it's
only going to behave as a directory of big XML files. The database
approach only really becomes worthwhile if you can call a script with,
say, top/bottom/left/right parameters which dynamically generates a
file listing only features located inside those limits.



This will be the next stage. I just wanted to get the MySQL stuff working firstly. Next I will look at splitting the files, however its quite a lot more work so I just wanted to do this step by step. It'll also mean I will be able to rewrite the GPX headers etc on the fly, choose whether to include waypoints as an overlay etc etc.

I'm now figuring out the best way to split the gpx file into the MySQL database, and also how to create an elevation plot of the routes.

All fun stuff!

Thanks


0 Comments:

Yorum Gönder

<< Home


Komik Videolar   islam  şarkı sözleri  yemek tarifleri  gelibolu  huzur   sağlık