Jump to content

glasgowduo

Newbies
  • Posts

    5
  • Joined

  • Last visited

Everything posted by glasgowduo

  1. Ah. I see - sorry I misled you there. No I don't have anything like that (but would find that very useful for other things I'm working on so will keep my eyes open for something and will copy you in if I find anything - promise!) No, my current db application is going to be very specific to my local environment in Glasgow here in Scotland. The places in question will be various specific places in and around Glasgow and so the distances will be between specific individual buildings. Not much use to most folk! Sorry. All the best, Paul
  2. Thanks mr (john) vodka, ender and comment... now starting to work through your suggestions - all very gratefully received! Will post back when I seem to get this through my thick skull and make some way forward with it... speak soon, Paul
  3. Hi Daniele - your English is perfect! (And WAY better than my Italian!) I'd be happy to send you the table but it is really nothing more than I said in my original post, just a primary key, a name, a couple of fields to hold the co-ordinates and the calculation fields. I really don't think you'd find this tiny table very useful. Once I have this functionality sorted out, I'll be adding many more fields to describe each recorded "place" but that's not there yet and, anyway, will be very specific to the sorts of places I'm recording and not much use to anyone else. But, if you really do want it, then let me know and I'll email an FM file with a copy of this "Place" table. cheers... Paul
  4. Hi! Afraid I can't help but that is excactly what I am trying to do for my application too. I'm using the Haversine formula to do this which might be of interest? It does work fine for "as-the-crow-flies" distances but these tend to have to be triangulated using a bit of Pythagorus to get a "drive-along-roads" distance (typically 140% longer, give or take). Anyway, I'm almost there with my applcation but can't quite figure how to make the data array build up on the fly. My post (if you're interested) is at http://fmforums.com/forum/showtopic.php?tid/185364/post/244166/ Perhaps we could agree to keep in touch if either of us comes up with a solution for this type of application of FM? Thanks, Paul
  5. Hi - just joined, so a big "Hi" first of all. Only just discovered this forum and it looks great! I hope to be here for many years helping and being helped. I have a bit of a problem and need a nudge in the right direction. Any takers? My database is managing multiple "Places" at different geographical locations. I would like to be able to automatically produce information on the "as the crow flies" distance between the co-ordinates captured for each record of a Place. My "Place" table holds fields that capture "lat" and "long" aspects of geospherical co-ordinates and a calculated "distance" field that uses a custom function I created (well, the authors of "FileMaker 8 Functions and Scripts" created to be fair!) that can take these lat and long co-ordinates for two separate Place records (so, four pieces of data) and will calculate the distance using the Haversine forumala. (http://en.wikipedia.org/wiki/Haversine_formula) for anyone interested. My inclination was to create a self-join relationship between my original "Place" table and a new table occurrence of Place that I have called "OtherPlace" and so have done so using a cross-product relationship. I then embed a portal control for the "OtherPlace" table occurrence in one of my tabbed "Place" layouts and this dutifully shows a list of all of the "Place/OtherPlace" records in my database. It also correctly shows the lat and long values for every record in "OtherPlace" AND the lat and long values for the parent "Place" repeated identically as expected on every row of the portal. So far so good! - so, what is my problem? The problem I cannot quite figure out why my new portal won't make the calculation between every "pair" of Places according to the Haversine forumula in my custom function. [if I create DUMMY fields for "another" place in just one record, the forumula works just fine, by the way - so the problem is not with the formula/ custom function.] What it won't do is, via the portal of "OtherPlace" records, calculate the distance between each "OtherPlace" record in a row of the portal and the single 'parent' "Place" record shown in the main layout. It is as if the coordinates for the other side of the pairing of places are all set to zero, even though they show up in the portal row correctly. I've tried changing the relationship between "Place" and "OtherPlace" to be a exclusionary type (where the "Place" primary key does NOT equal the "OtherPlace" primary key) and this does remove the parent record from the portal list as expected but still the Haversine calculations are wrong. I know this has to be to do with how I am designing the relationship between an individual record in the "Place" table occurrence and all other records for Places in a "OtherPlace" table ocurrence but can't make my brain fire-up to puzzle it out. Self-joins are always a head-nip for me! Where am I going wrong? Perhaps there is some other way of building up some sort of data array to hold the distances between every pair of records in a single "Place" table but that's beyond me (using FileMaker) if I'm being honest - but if there is some way to do that I'd be grateful for a nudge in the right direction. Thanks a million, Paul
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.