RE: [MI-L] Digest for mapinfo-l@googlegroups.com - 6 updates in 3 topics

25 views
Skip to first unread message

Matthew Hirsch

unread,
Mar 4, 2021, 10:36:12 AM3/4/21
to mapi...@googlegroups.com

Peter,

 

You said to use SelectionInfo to get a static name for the Selection.

When I tried to test that as the name of the query it just called it SelectionInfo.

I created the query using the SQL Select tool and got this as the code result.

 

Select * from det_dedup_nondup where left$(zone,6)="222-81" into SelectionInfo

Browse * From SelectionInfo

 

 

 

Regards,

Matthew

 

From: mapi...@googlegroups.com <mapi...@googlegroups.com>
Sent: Wednesday, March 3, 2021 9:05 PM
To: Digest recipients <mapi...@googlegroups.com>
Subject: [MI-L] Digest for mapi...@googlegroups.com - 6 updates in 3 topics

 

·        Multiple independent points in one record - 3 Updates

·        Detect changes to object geometry - 2 Updates

·        Reset query numbers on close all - 1 Update

Ian Oldfield <oldfie...@googlemail.com>: Mar 03 06:59AM -0800

Hi,
Is it possible to have a single row in a table but with multiple location
points with their own coordinates? I think the answer is no, but I'm
always learning.
 
What I would like to have is a single row ID but then attach 1-4 points to
that record without having 1-4 rows. Hopefully, the question makes sense,
the proposal may not!
 
Here's the logic (if logic is the correct word): Mr A lives at House X, he
works at Loc Y and visits Loc Z. For my purposes I'd like to know if I
could capture all these in a single record with independent coordinate
pairs in the same row and thus display, in this case, three points in a
single selection.
 
Thank you for any responses.
 
Ian Oldfield.

"Martin Hodder" <mho...@highermappingsolutions.com>: Mar 03 03:04PM

Hi Ian,
 

 
You can do this via a multipoint.
 

 
Multipoint - Combines a number of points into a single object. All points have the same symbol. The Multipoint object displays in the Browser as a single record. You can issue this statement from the MapBasic window in MapInfo Pro.
 

 
Syntax
 
Create Multipoint
 
[ Into { Window window_id | Variable var_name } ]
 
[ num_points ]
 
( x1, y1 ) ( x2, y2 ) [ ... ]
 
[ Symbol... ]
 

 
If that is what you need.
 

 
Regards
 

 
Martin Hodder
 
Higher Mapping Solutions
 
<http://www.highermappingsolutions.com/> www.highermappingsolutions.com
 

 
From: 'Ian Oldfield' via MapInfo-L <mapi...@googlegroups.com>
Sent: 03 March 2021 15:00
To: MapInfo-L <mapi...@googlegroups.com>
Subject: [MI-L] Multiple independent points in one record
 

 
Hi,
 
Is it possible to have a single row in a table but with multiple location points with their own coordinates? I think the answer is no, but I'm always learning.
 

 
What I would like to have is a single row ID but then attach 1-4 points to that record without having 1-4 rows. Hopefully, the question makes sense, the proposal may not!
 

 
Here's the logic (if logic is the correct word): Mr A lives at House X, he works at Loc Y and visits Loc Z. For my purposes I'd like to know if I could capture all these in a single record with independent coordinate pairs in the same row and thus display, in this case, three points in a single selection.
 

 
Thank you for any responses.
 

 
Ian Oldfield.
 

 

 
--
--
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 <mailto: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 <mailto:mapinfo-l+...@googlegroups.com> .
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/c53ad4d0-459c-4f3c-8598-646cde7f4875n%40googlegroups.com <https://groups.google.com/d/msgid/mapinfo-l/c53ad4d0-459c-4f3c-8598-646cde7f4875n%40googlegroups.com?utm_medium=email&utm_source=footer> .

Ian Oldfield <oldfie...@googlemail.com>: Mar 03 03:16PM -0800

Hi Martin
 
As always, very much appreciate your help and guidance, thank you.
Ideally, the symbols would be different to reflect the different
nature/subject of the location. However, I'll try to experiment with what
you have suggested as this may suffice.
 
Kind regards
 
Ian.
 
On Wednesday, March 3, 2021 at 3:04:12 PM UTC Martin Hodder wrote:
 

Uffe Kousgaard <uffe.ko...@routeware.dk>: Mar 03 08:17AM +0100

Hi,
 
There is no easy query, but a generic solution would be something like this:
 
1) Sort both tables according to ID
2) Loop through the tables, while you check if objects exist in table1,
but not table2 and vice versa.
3) If they exist in both tables, check if they are the same object type,
PLINE.
4) Check if they have the same number of nodes
5) Finally check if the coordinates are the same.
6) Move to next object(s).
 
Regards
Uffe Kousgaard
 
On 02-03-2021 21:02, James Harvie wrote:

"Peter Horsbøll Møller" <Peter....@precisely.Com>: Mar 03 07:43AM

You could also chose to update a text column with some spatial characteristics of the spatial object.
 
That could be the length, the centroid X and Y values, the number of nodes and maybe the coordinates of the start and end nodes.
Divide these values with a spatial character like “|” or “#”.
 
If these values are identical, there is a good chance the objects are identical too.
 
If you want to be completely sure, you will have to inspect the individual nodes.
 
Peter Horsbøll Møller
www.precisely.com<http://www.precisely.com/>
 
From: mapi...@googlegroups.com <mapi...@googlegroups.com> On Behalf Of Uffe Kousgaard
Sent: 3. marts 2021 08:18
To: mapi...@googlegroups.com
Subject: Re: [MI-L] Detect changes to object geometry
 
This message originated Externally. Use proper judgement and caution with attachments, links, or responses.
 
Hi,
 
There is no easy query, but a generic solution would be something like this:
 
1) Sort both tables according to ID
2) Loop through the tables, while you check if objects exist in table1, but not table2 and vice versa.
3) If they exist in both tables, check if they are the same object type, PLINE.
4) Check if they have the same number of nodes
5) Finally check if the coordinates are the same.
6) Move to next object(s).
 
Regards
Uffe Kousgaard
On 02-03-2021 21:02, James Harvie wrote:
I need to compare two versions of the same road network file to determine which records have had a change in their object geometry between the two versions. Is there a query that can do this quickly? I do not need to know what the change was, just that there was a change. Both tables have a corresponding unique ID.
 
James Harvie
--
--
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<mailto:mapi...@googlegroups.com>
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l/subscribe?hl=en__;!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMxxvr4owW$>
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<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l?hl=en__;!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMxzgzBKoP$>
 
---
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<mailto:mapinfo-l+...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/09abeee2-4575-41b4-bab1-1053789f8a2fn%40googlegroups.com<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/mapinfo-l/09abeee2-4575-41b4-bab1-1053789f8a2fn*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMx_zyUKwF$>.
 
--
--
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<mailto:mapi...@googlegroups.com>
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l/subscribe?hl=en__;!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMxxvr4owW$>
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<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l?hl=en__;!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMxzgzBKoP$>
 
---
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<mailto:mapinfo-l+...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/c1aca906-0379-3c6c-ea86-053195264b65%40routeware.dk<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/mapinfo-l/c1aca906-0379-3c6c-ea86-053195264b65*40routeware.dk?utm_medium=email&utm_source=footer__;JQ!!I6-MEfEZPA!fx_g57NRsImXeRMwvcLsKuMQtQjxkdS9PA5ouJHju6rGuy0jGtIS15lyquiMxz2B2Dba$>.

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer
Precisely.com
 
----------------------------------------------------------------------------------------------------------
ATTENTION: ------
Syncsort Limited is a limited company registered in England and Wales. Registered number: 01373158. Registered office: 3rd Floor, The Pinnacle, 20 Tudor Road, Reading, RG1 1NH. VAT: GB295525177
The information contained in this message (including any files transmitted with this message) may contain proprietary, trade secret or other confidential and/or legally privileged information. Any pricing information contained in this message or in any files transmitted with this message is always confidential and cannot be shared with any third parties without prior written approval from Syncsort. This message is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any use, disclosure, copying or distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or Syncsort and destroy all copies of this message in your possession, custody or control.

"Peter Horsbøll Møller" <Peter....@precisely.Com>: Mar 03 07:37AM

Hi Matthew
 
My initial thought was that the counter was session-based but when I tried it, it seems to get reset when I close all.
 
My test was however very basic.
 
1. Open one table
2. Select one record from that table and show Selection in a browser. This renamed Selection to Query1
3. Close All
4. Repeat.
 
It’s certainly isn’t enough to just close the queries.
 
Do you have the source code for the script?
If you do, I’d recommend selecting into a named query, or at least use SelectionInfo to get a static name for the Selection
 
Peter Horsbøll Møller
www.precisely.com<http://www.precisely.com/>
 
From: mapi...@googlegroups.com <mapi...@googlegroups.com> On Behalf Of Matthew Hirsch
Sent: 3. marts 2021 05:02
To: mapi...@googlegroups.com
Subject: [MI-L] Reset query numbers on close all
 
This message originated Externally. Use proper judgement and caution with attachments, links, or responses.
 
I am dealing with some old MB code that did not name queries so everything is query 1,2,3 etc.
 
The problem is in the script, it closes everything and then assumes the queries will reset back to 1.
 
I am not seeing that happen. Is there some setting that will do this or a command to reset the query numbers?
 
Thank you.
 
Matthew Hirsch
--
--
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<mailto:mapi...@googlegroups.com>
To unsubscribe from this group, go to:
http://groups.google.com/group/mapinfo-l/subscribe?hl=en<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l/subscribe?hl=en__;!!I6-MEfEZPA!eC_zaAWiIsj2bI0vj_xkCMGsTHXtvRHEKIJ1DwLum_PtzEBap-GNgKqG7xtR95RADk2U$>
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<https://urldefense.com/v3/__http:/groups.google.com/group/mapinfo-l?hl=en__;!!I6-MEfEZPA!eC_zaAWiIsj2bI0vj_xkCMGsTHXtvRHEKIJ1DwLum_PtzEBap-GNgKqG7xtR917ns4Bb$>
 
---
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<mailto:mapinfo-l+...@googlegroups.com>.
To view this discussion on the web visit https://groups.google.com/d/msgid/mapinfo-l/ee9945daa2d24c198c4414b271848782%40lmsg.co<https://urldefense.com/v3/__https:/groups.google.com/d/msgid/mapinfo-l/ee9945daa2d24c198c4414b271848782*40lmsg.co?utm_medium=email&utm_source=footer__;JQ!!I6-MEfEZPA!eC_zaAWiIsj2bI0vj_xkCMGsTHXtvRHEKIJ1DwLum_PtzEBap-GNgKqG7xtR9_clG3aj$>.

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer
Precisely.com
 
----------------------------------------------------------------------------------------------------------
ATTENTION: ------
Syncsort Limited is a limited company registered in England and Wales. Registered number: 01373158. Registered office: 3rd Floor, The Pinnacle, 20 Tudor Road, Reading, RG1 1NH. VAT: GB295525177
The information contained in this message (including any files transmitted with this message) may contain proprietary, trade secret or other confidential and/or legally privileged information. Any pricing information contained in this message or in any files transmitted with this message is always confidential and cannot be shared with any third parties without prior written approval from Syncsort. This message is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any use, disclosure, copying or distribution of this message, in any form, is strictly prohibited. If you have received this message in error, please immediately notify the sender and/or Syncsort and destroy all copies of this message in your possession, custody or control.

You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to mapinfo-l+...@googlegroups.com.

 

Peter Horsbøll Møller

unread,
Mar 4, 2021, 11:08:32 AM3/4/21
to mapi...@googlegroups.com

Ah, sorry, I should have been a bit more precise.

 

Either use a named query:

 

Select * from det_dedup_nondup where left$(zone,6)="222-81" into __tempquery

Browse * From __tempquery

 

Or use SelectionInfo to get the query name:

Select * from det_dedup_nondup where left$(zone,6)="222-81" into Selection

Dim sQueryName As String

sQueryName = SelectionInfo(SEL_INFO_SELNAME)

Browse * From sQueryName

 

The benefit of using the named query is that you can combine this with the NoSelect keyword to avoid highlighting the result.

 

Select * from det_dedup_nondup where left$(zone,6)="222-81" into __tempquery NoSelect

Browse * From __tempquery

 

This is useful if you don’t need the selection later in your processing and it doesn’t interfere with a potential existing selection.

Also it can have the side effect of a better performance.

 

For the later versions of MapInfo Pro (v17 and never), you can also add the Hide keyword to avoid showing the query in the Table List in the Explorer window.

 

Select * from det_dedup_nondup where left$(zone,6)="222-81" into __tempquery NoSelect Hide

Browse * From __tempquery

 

Hop that helps

 

Peter Horsbøll Møller

www.precisely.com

 

Peter Horsbøll Møller
Principal Sales Engineer - Distinguished Engineer

 

--

--
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/437950dfc2e3405fa0c7e4e25710f347%40lmsg.co.

Reply all
Reply to author
Forward
0 new messages