Jump to content

Disgust


fizzymagic

Recommended Posts

I am pretty disillusioned with the geocaching developers community at this point. I've been talking with two others who are developing Perl-based apps to deal with GPX files, and neither is willing to share any of their code or techniques with others.

 

I don't want to steal anybody's precious apps; I just want to get ideas on tricks like parsing the time stamp, generating nice HTML from the logs, etc.

 

Now I have to go and waste a lot of time re-inventing the wheel from scratch to make a script that does what I want, all because of others' egos.

 

It's too bad, since I have a unique expertise that would have made for some significant improvements in features. Example: I have code that will choose waypoints based on their distance from a path instead of a point. So I could generate lists of waypoints for people driving along a given route. But since I am going to have to develop everything myself, my inclination to share is much reduced.

 

The apps may get better, but the bad taste will linger.

Link to comment

quote:
Originally posted by fizzymagic:

I am pretty disillusioned with the geocaching developers community at this point. I've been talking with two others who are developing Perl-based apps to deal with GPX files, and neither is willing to share _any_ of their code or techniques with others.

 

Now I have to go and waste a lot of time re-inventing the wheel from scratch to make a script that does what _I_ want, all because of others' egos.

 

But since I am going to have to develop everything myself, my inclination to share is much reduced.


 

Are you saying that you are going to join the crowd so that we can be "disillusioned" with you too? Seriously I know how you feel but be bigger than the others and set an example.

 

________________________________________________________________________

Before you criticize someone, walk a mile in their shoes. That way, you'll be a mile from them, and you'll have their shoes.

15777_2200.gif

Link to comment

I'm not developing any Perl-based apps to parse GPX, for the simple reason that I don't want the server load that would go with one, but I have some other Perl code you might find useful. If you have any interest in various PalmOS file formats or in getting Terraserver imagery, I'll be happy to share whatever I have.

 

As for parsing the timestamp:

 

($year,$month,$day,$hour,$minute,$second,$tzoff_dir,$tzoff_hr,$tzoff_min) =   ($timestamp =~   m/(-?d{4,})-(d{2})-(d{2})T(d{2}):.{0}(d{2}):.{0}(d{2}(?:.d*)?)(?:Z|([+-])(d{2}):.{0}(d{2}))?/);$tzoffset = $tzoff_hr*3600+$tzoff_min*60;$tzoffset = -$tzoffset if ( $tzoff_dir eq '-' );

 

The three occurrances of ".{0}" can be removed; they're there to keep icon_frown.gif frownies from appearing in my code. If you leave them, though, they won't have any effect on the operation of the code.

 

This gives you the date and the timezone offset from UTC ($tzoffset is the offset in seconds, and the other $tzoff_* variables, if defined, are the offset direction (+ or -), hours, and minutes.)

 

warm.gif

Link to comment

Your line there is very helpful.

 

I'm doing this in Perl because Perl does text manipulation very well. It's not meant for a server. The idea is to use Perl and a database together to give me a great deal of local power.

 

And, everybody else: no, I don't intend to withhold any of my code. I didn't say that others' actions were going to cause me to do so; instead I said that it made me feel les like doing so. But I try to do the right thing always.

Link to comment

I know what you mean. I have talked to three folks developing GPX utilities in Perl in the last 48 hours and none of them can/will share their code. I'm even part of the problem; I've had GPX->HTML writers here since the first example was posted, but since I based my code on code from someone that wouldn't generally release his code, I can't release mine, either.

 

I'll tell you what, though, if there's interest I'll let this ride in the GPSBabel infrastructure on http://gpsbabel.sourceforge.net . We can create separate lists and ride on the same web and CVS infrastructure. I'll have to think about how we distribute the human workload, but that's solvable. (Hint: I won't want to be webmaster for your project. :-)

 

So if you or AllenLacy would like a home for a GPX utilitiy, let me know.

 

P.S. Please try to pick better subject threads.

Link to comment

quote:
Originally posted by robertlipe:

I'm even part of the problem; I've had GPX->HTML writers here since the first example was posted, but since I based my code on code from someone that wouldn't generally release his code, I can't release mine, either.

...

P.S. Please try to pick better subject threads.


 

GPX->HTML: Please take a look at this thread for a cross-platform, configurable GPX->HTML solution that only requires an XSLT processor for your platform. On Linux, for example, I can install libxslt and then run the included xsltproc utility.

 

Better thread subjects: Yeah, that's probably why nobody's reading the XSLT thread, huh?

 

warm.gif

Link to comment

The heading above is the flip side of "Information wants to be free".

 

I'm working on VB/VBScript stuff to handle GPX to palm translation, and unfortunately, it's all registration-required shareware (30-day limits, etc.) to access PDAToolbox data.

 

So I can't give my source away, because it would include registration codes.

 

So I'm starting from scratch, and seeing how quickly I can develop PC interface to Palm databases. I'm most likely going to explore a Palm conduit approach. But it will be free. (DougsBrat, who wrote the Palm side of the app, will have to decide on whether he's going to charge).

 

Just for fun, here's a fragment of the VBScript code to handle some of the GPX file:

(assumes sFile contains a GPX filename)

set oXML = CreateObject("MSXML2.DOMDocument")oXML.validateonparse = falseif oXML.Load(sFile) then  set oXWaypoints =  oXML.selectNodes("//wpt")  for each oOneWP in oXWaypoints    sWPType = oOneWP.selectsinglenode("type").text    if sWPType = "Geocache" then      with oOneWp	fLat = .selectsinglenode("@lat").text	fLon = .selectsinglenode("@lon").text	sctry = .selectsinglenode("Groundspeak:cache/Groundspeak:country").text	sStuff = .selectsinglenode("Groundspeak:cache/Groundspeak:short_description").text & vbLF & _	  .selectsinglenode("Groundspeak:cache/Groundspeak:long_description").text & vbLF & _	  vbLF & "Hint:" & vbLF & _	  Rot13(.selectsinglenode("Groundspeak:cache/Groundspeak:encoded_hints").text)	sdesc = replace(sStuff,vbCRLF,vbLF)	sgcid = .selectsinglenode("name").text	sgcna = .selectsinglenode("desc").text	stype = .selectsinglenode("Groundspeak:cache/Groundspeak:type").text & " " & _	.selectsinglenode("Groundspeak:cache/Groundspeak:container").text	sstate = .selectsinglenode("Groundspeak:cache/Groundspeak:state").text	sdiff = .selectsinglenode("Groundspeak:cache/Groundspeak:difficulty").text	sterr = .selectsinglenode("Groundspeak:cache/Groundspeak:terrain").text      end with      'Do something with all those variables here      iCnt = iCnt + 1    end if  nextend if

 

Pretty basic XML stuff.

Joel

 

I am Arrowroot, son of Arrowshirt. I have many names, you know

Link to comment

quote:
I could generate lists of waypoints for people driving along a given route.

I would love something that would do that, we're driving to FLA the end of February and I've been trying to figure out how I'm going to accomplish that exact task! (I have a PPC, Windows CE, not a Palm thought...)

Don't give up! Sounds like there's a lot more willing to participate than those who won't/can't. I on the other hand can only watch in awe at what others can do with this stuff!

 

"We judge ourselves by what we feel capable of doing, while others judge us by what we have already done." Henry Wadsworth Longfellow

 

migo_sig_logo.jpg

Link to comment

quote:
Originally posted by arrowroot:

 

So I'm starting from scratch, and seeing how quickly I can develop PC interface to Palm databases. I'm most likely going to explore a Palm conduit approach. But it will be free. (DougsBrat, who wrote the Palm side of the app, will have to decide on whether he's going to charge).


 

As a sidebar, I whipped up a module for GPSBabel for Doug's "GeocachingDB" files just a day or two ago. (Fuzzy reviewed it.) I had a few additional questions for him before I committed it, but it's in sight. I haven't heard back from Doug, but it's only been a short time.

 

Anyone with a completely populated geocachingDB.pdb file that they'd like to donate to the cause is encouraged to send it to me for study as the examples he provided me were too contrived.

 

Once that module is done, geocachingdb->GPX or similar combinations are within reach.

Link to comment

While I can't release the half of it that writes HTML, it just occurred to me that the part of it that reads GPX is mine to do with as I wish. If there is interest, I could publish (probably on the GPSBabel site) my code that uses XML::Twig to walk the tree, building Perl arrays for caches, logs, and such. I'd have to rip it out of the other code but it's, oh, 100 lines of stuff so it's hardly massive.

Link to comment

I'm not sure a Sourceforge project is appropriate here; it requires a pretty coherent vision of where you're going and a well-defined app to come out the back end.

 

I am making something considerably more ad hoc; I have tools that I like and I want to link them all together to make them do what I want, but I am not sure I'll ever produce anything that would be easily distributable.

 

Maybe what we need is a separate developers' forum here.

 

Anyway, thanks to everyone who responded. I'm very encouraged now.

Link to comment

quote:
Originally posted by robertlipe:

As a sidebar, I whipped up a module for GPSBabel for Doug's "GeocachingDB" files just a day or two ago. (Fuzzy reviewed it.)


 

I haven't looked at GPSBabel. The script I've written uses PDATBDB40 -- the registration-required software I referred to. Doug is in the process of making mods to GeocachingDB, and when our versions sync up, it'll show up here, I'm sure.

 

PDATBDB40 won't work well as a conduit -- it doesn't have the right interface for the 'live' HotSync. I'm not sure GPSBabel would either. Frankly, PDAToolbox isn't the easiest thing to sync with -- it's missing some record status info that Palm databases are supposed to have.

 

Joel

 

I am Arrowroot, son of Arrowshirt. I have many names, you know

Link to comment

fizzy,

 

While I've already sent you a personal email, I want to publicly apologize for the tone of the email I sent you initially. I didn't say I wouldn't share any code, I just don't want to share all my code icon_wink.gif

 

I've already obtained a bit of code from Brian Scearce, the fellow behind the old Palmable Indexes, and I am quite willing to share my code with others as well.

 

As far as parsing the XML, I did it the hard way by writing a bunch of GPX-specific regexps. I learned Perl in an environment where everything had to be completely platform independent. That meant we couldn't use any modules. We often did cut/paste code out of modules to include in our code. I've gotten used to that way of doing things, so even now that I can, I still don't use modules.

 

So how can I help?

 

Lil Devil lildevil.gif

Link to comment

quote:
Originally posted by robertlipe:

While I can't release the half of it that writes HTML.


I as you know am using XML::Twig to extract the information from the GPX file. I plan to use HTML::Template to build the HTML. I have had good success with it in project to convert data in a database into HTML. It is very nice in that you can have multiple templates and choose the one to use based on commandline parameters, or User Agent or some sort of parameter file.

 

Now if my pocket queries will start showing up.

Link to comment

Replies coalesced.

 

fizzymagic> I'm not sure a Sourceforge project is appropriate here; it requires a pretty coherent vision of where you're going and a well-defined app to come out the back end.

 

If you have that, great. But I'm pretty sure that we could all benefit from seeing the scratch work of others in this regard. So while a highly focused actual project would be good to have, even just a playground for developers to share pieces and parts and discuss things that will or won't work well from experience would be handy.

 

Would you have benefitted from the skeleton to parse these? I sure would have.

 

If not a full-scale project, how about just some web space on the gpsbabel site and a mailing list for developers?

 

Arrowroot> The script I've written uses PDATBDB40 -- the registration-required software I referred

 

GPSBabel will remain unencumbered by such things. It reads (and will eventually write) files without licensing restrictions. This means it'll work on OS/X, Sun/Solaris, UnixWare or whatever. It also means that it solves a different space than what you're aiming for becuase things like conduits are out of reach. It writes boring old files that you have to manually sync to your PDA. For folks using the OSes your support, I'm sure yours will be "slicker". For folks needing to automate the output of these things on their Linux server, another tool might be more appropriate. Choice is good!

 

Lildevil> As far as parsing the XML, I did it the hard way by writing a bunch of GPX-specific regexps.

 

You're probably making your life considerably harder than you need to. While parsing XML manually one regex at a time is possible, it's very hard to accurately handle the full variety of legal XML. Can you parse the stuff specifically written by geocaching.com today? Sure. Are there changes that geocaching.com could make to the GPX file that would still result in legal XML but break your parser? Not to be discouraging, but bank on it. Using an establish XML Parser will greatly robustify your code against future changes on the input.

Link to comment

I got my Perl script to generate HTML files with nearest caches in them. It ain't pretty, and it ain't well-documented, but it works. Feel free to grab the source here.

 

For 500 caches in the Bay Area, it came out to a file size of 885K. Not bad; I will be able to cram a whole bunch of geocaches into an 8MB Palm.

 

Note that this HTML generator makes no use of Brian Scearce's code at all, so it is fine to redistribute. And it will change a lot soon.

 

[This message was edited by fizzymagic on January 09, 2003 at 07:33 PM.]

Link to comment
Guest
This topic is now closed to further replies.
×
×
  • Create New...