Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is there an easier way to do this?
Message
De
27/11/2006 10:31:51
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
26/11/2006 11:42:00
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 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01172477
Message ID:
01172670
Vues:
13
>I have two four place decimal numbers (eg .0123 and .4321) I need to combine them into a unique decimal value for processing. As they are map coordinates, they cannot just be added together because sum of .0123 + .4321 is the same as .4321 + .0123. I'm thinking I could multiply each times 10,000 to remove the decmals. Then convert them to a string value, and using the 'additive' operator, butt them together so that they look like this 01234321 when stored in a table. For processing I would need to convert the number to an eight place decimal value using val() and dividing the result by 100000000. After processing, the resulting decimal output would be coverted to eight places if neccesary and split into two four place value and converted to a four place decimal value and then to two four place integers to be used as a map coordinates.
>
>Is there a better way to code this or am I on the right track?

Graddy,
When you have time search for SQL server, spatial, triangle keywords. I don't know if those keywords would take you to an article in word doc format about mapping points of map coordinates to an integer, but if it does, that article was nice providing a fast spatial indexing algorithm (I know, I know not a reply to your question, not directly at least).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform