MapInfo Pro

 View Only
  • 1.  MapBasic Monday - Advance Geo Selections

    Posted 07-23-2023 22:55
    Edited by Peter Møller 07-24-2023 05:30
      |   view attached

    Hi All,

    Happy #MapInfoMonday / #MapBasicMonday!

    Today I want to introduce you to a MapBasic application developed based on a question asked in MapInfo Community.

    The question is asked by Michele Burgalossi , to select objects that intersect with another object but not overlap i.e., only share (touch) by a common point or border.

    I have developed a MapBasic application and named it as "Advance Geo Select.mbx", You can download it from below. After running you can see the Advance Geo Select button under Legacy tab.  This program does not do any change in the table /records.

    We will test it with 2 tables named BluePoly and GreenPolygon. You can see that Green 1 & Green 4 Polygons touches Blue 1 & Blue 2 Polygons, Green 5 does not intersects with any of them. There are all kinds of object types exist in BluePoly layer.

    When the Advance Geo Select button clicked the dialog will be displayed.

    There are 3 types of operation in the middle list.

    1.      Relations

    First option selects region object from Table 1 where objects Touches but not Overlaps with Table 2, i.e. Green 1 and Green 4  records

    Second option selects region object from Table 1 where objects Overlaps  but not Touches with Table 2, i.e. Green 2 and Green 3  records

    The regular operators exists in SQL dialog listed in the form, from Contains to Intersects.

    To select the reverse of the expression choose Select Reverse option under the relations list.

    2.      Combined Objects / No Objects

    There may be some combined polygons and polylines in the table, to select them simply choose it from the list. This option will record "Combined Polygon" and "Combined Polyline" records.

    The result of combined objects are as shown below.

    If you want to select records without any object linked, choose Rec w/o Objects from the list. This option will list the "No Object" record.

    3.      Show Area/ Length/ Perimeter / Centroid

    If you want simply to display area, length, perimeters or Centroids of objects, you can use the last part of the list.

    The area or perimeter of regions, the  length of lines  are displayed  like below

    The coordinates can be shown in Degrees, table projection or map  projection (if the front window is a mapper)

    The coordinates in degrees shown below .

    Hope this post can be helpful who needs such functions.

    Please let me know if there is any problem with the MBX.

    Best regards



    ------------------------------
    Ahmet Dabanli
    Başarsoft
    Türkiye
    ------------------------------

    Attachment(s)

    zip
    Advance_Geo_Select.zip   3 KB 1 version


  • 2.  RE: MapBasic Monday - Advance Geo Selections

    Posted 07-24-2023 05:20
      |   view attached

    Hi All, It seems there is a problem with the Mbx file,

    I'am attaching it again.

    Hope this will work



    ------------------------------
    Ahmet Dabanli
    Başarsoft
    Balgat, Cankaya
    ------------------------------

    Attachment(s)



  • 3.  RE: MapBasic Monday - Advance Geo Selections

    Posted 07-26-2023 10:21
      |   view attached

    Hi All,

    I have fixed a bug for Touches and overlaps,

    added icons,
    included the MapBasic Source .

    Best Regards



    ------------------------------
    Ahmet Dabanli
    Başarsoft
    Balgat, Cankaya
    ------------------------------

    Attachment(s)