Hello,
I am trying to write a statement where it returns the distance from multiple points to a single point. Similar to the distance tool, but in mapbasic.
Then, I want to create ranges so that the closest 50% of the record gets put into 1 range and the farthest 50% of the record into another. I want the result to be similar to a thematic map using quantile ranges, but I don't care about the map. I only want the data stored in the table if possible. Here's what I have so far:
Farthest All From Table MobData To PropData Into BlankTable
Data FromID=DistID, ToID=Destination_ID, DailyVisits=Daily_Visits
Update BlankTable set DistM = ObjectLen(obj,"m")
Dim Quantile_Array as Float
Create Ranges From BlankTable
With DistM Quantile Using Dailyvisits
Number 2
Into Variable Quantile_Array
Here, the MobData is the origin points and the PropData the destination. The Distance (DistM) and the relevant record IDs gets stored into BlankTable. What I'm struggling is to create range. I am always getting "Invalid variable type" error message and I have tried a few variable types (Float, LargeInt, Integer).
FYI: DistM & DailyVisits are Integer variables.
What Am I missing?
Thanks in advance