+Tungmar Posted May 26, 2018 Share Posted May 26, 2018 Hello I'm writing a little helper script in PHP which should also create GPX files whit the Groundspeak extension to store geocache descriptions. I could not find a library which is able to write such GPX files. Does any one know one? Thank you! Quote Link to comment
+NYPaddleCacher Posted May 27, 2018 Share Posted May 27, 2018 14 hours ago, Tungmar said: Hello I'm writing a little helper script in PHP which should also create GPX files whit the Groundspeak extension to store geocache descriptions. I could not find a library which is able to write such GPX files. Does any one know one? Thank you! A GPX file for a geocache is just an XML file which complies with the GPX schema with Groundspeak extensions. A PHP library which converts structured data (an associative array, results of a relational database query) to XML would do the job. Quote Link to comment
+Tungmar Posted May 27, 2018 Author Share Posted May 27, 2018 Thank you for your answer. I know that is possible. I was hoping there is one which would ease the process. No need to reinvent the wheel :-) Quote Link to comment
+NYPaddleCacher Posted May 28, 2018 Share Posted May 28, 2018 18 hours ago, Tungmar said: Thank you for your answer. I know that is possible. I was hoping there is one which would ease the process. No need to reinvent the wheel :-) Sorry that I can't help more. Although I've done a fair amount of programming in PHP I'm primarily a Java and Ruby programmer. How are you managing your data that you'll use to create a GPX file? You might want to take a look at GPS Babel, which is what GSAK uses under the hood. It supports a lot of different formats and could be used, for example, to transform a CSV file to GPX. You could make a system call with PHP to invoke gpxbabel.exe (it only runs on windows) with the necessary parameters. Quote Link to comment
+Tungmar Posted May 29, 2018 Author Share Posted May 29, 2018 Good idea whit GPSbabel! And it ia available for all kinds of platforms. However, it does not support the SQLite database where the data currently is stored. So I would need to export it any way (even to a simpler format). I probably will just write a export directly to GPX. Tank you for your help. Quote Link to comment
+Team DEMP Posted May 30, 2018 Share Posted May 30, 2018 Did you do a Google search for PHP GPX? I see a couple of hits that could be what you want and appear to be actively maintained. Did they not meet your needs? Quote Link to comment
+Tungmar Posted June 4, 2018 Author Share Posted June 4, 2018 Yes there are many but I can't find one which supports the Groundspeak extension. I ended up writing my own quick and dirty code :-( Quote Link to comment
+NYPaddleCacher Posted June 6, 2018 Share Posted June 6, 2018 On 6/4/2018 at 6:47 AM, Tungmar said: Yes there are many but I can't find one which supports the Groundspeak extension. I ended up writing my own quick and dirty code :-( Did you commit it to Github so other can find and use it? Quote Link to comment
+Tungmar Posted June 14, 2018 Author Share Posted June 14, 2018 It is on Gitlab but it isn't complete or in a state where you can use it out of the box for other use cases: https://gitlab.com/Tungmar/DeadDrops2GPX/blob/master/src/QDGpxWriter.php Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.