In need of assistance to create ranges statement

26 views
Skip to first unread message

Samuel Emard

unread,
Aug 16, 2021, 10:08:23 AM8/16/21
to MapInfo-L
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


Samuel Emard

unread,
Aug 16, 2021, 10:13:02 AM8/16/21
to MapInfo-L
Also, 

Just to be more clear, the goal I want to achieve is to get the closest 50% of the DailyVisits into one range and the farthest 50% of the DailyVisits into another. 

If there is another, simpler, way to achieve this, I am open to suggestions. 

thanks 

Samuel Emard

unread,
Aug 16, 2021, 4:10:50 PM8/16/21
to MapInfo-L
Nevermind. 

I found the answer. 

thanks! 

Now, how can I delete/marked as answered this thread?

David Sherrod

unread,
Aug 16, 2021, 4:47:16 PM8/16/21
to mapi...@googlegroups.com
Sam, it's a community-minded listserv.  The kindest thing you can do is include your findings/conclusions/experience and then let it stand.  Others may benefit by your experience that way.

--
--
You received this message because you are subscribed to the
Google Groups "MapInfo-L" group.To post a message to this group, send
email to mapi...@googlegroups.com
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en
For more options, information and links to MapInfo resources (searching
archives, feature requests, to visit our Wiki, visit the Welcome page at
http://groups.google.com/group/mapinfo-l?hl=en

---
You received this message because you are subscribed to the Google Groups "MapInfo-L" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mapinfo-l+...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/mapinfo-l/bf5cb61f-9e6c-4c54-9ae2-4b28c9972ac8n%40googlegroups.com
.
Reply all
Reply to author
Forward
0 new messages