Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Map points within a circle or distance -- Pythagoras --
Message
De
24/10/2011 16:36:41
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
24/10/2011 11:20:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01527151
Message ID:
01527228
Vues:
59
J'aime (1)
>>>I have absolutely no idea what the lat/lons are in your code samples. If they're some sort of military grid system you'll need to convert them to conventional lat/lon.
>>
>>Looks like that's the longitude/lattitude in feet (measured from equator and prime meridian, I guess). These, divided with the radius (in feet) would give the angle in radians. And that would fit nicely with the rest of measurements being in feet. But then... how is the distance from the prime meridian taken - at equator, at the current lattitude, or as a distance from the (0,0) point?
>>
>>But then, this seems like the Australian maps where the south pole is on top... I mean, just guessing that these are coordinates in Tc's neighborhood, then these would be north and west, so... the numbers for the west should be negative.
>>
>>This is not the first time I've seen this - someone at the source of these data is so youesscentric that they have mirrored the coordinates so the horizontal axis has the negative semiaxis on the right, and the positive one on the left...
>
>They are in negative, but I have the values in state plane - I was tired and burned out I guess because it just dawned on me this morning!
>
>So:
>1713881.3750,833601.8125 = 36.0365602, -079.9677260
>
>Now I just have to find the code to convert back

Length of the arc divided by radius = angle divided by 180. Or, simpler, angle (in radians) times radius gives you length of the arc, in same units as the radius was. That's the beauty of using radians, they are just the arc divided by Pi, i.e. a quotient, number without unit of measure.

If you're operating within the state, you can go by Pythagora's, just making sure everything's in same units. The curvature of Earth shouldn't give you much error if you stay within NC. Let's see... NC, north to south, is about 200 miles; one degree on a meridian gives you about 86 miles, which is about 2-3 degrees. At your 35.018001 to 36.556717 latitude, the difference in width of the whole "rectangle" around NC at the north and south edge of it is about 0.42 miles.That's the maximal error if you use flat geometry Pythagoras instead of the spherical method to calculate the distance between that corner between Tennessee and Georgia on one end, and the north end of the Outer Banks coast. Actually, this is how much shorter the north edge is than the south, and I'm using that as an upper estimate. The actual error is no greater than the difference between an arc of 9 degrees vs a chord spanning such an arc, at a radius such as Earths. And I assume most of your distances would be shorter than that, so the error would actually be less than that.

Unless my math is rustier than I am :).

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform