MapInfo Pro

 View Only
  • 1.  How to get Start X/ Start Y of text string in MapInfo Pro?

    Posted 05-27-2024 05:15

    We are trying to get the coordinates of the first character of the text string in the layer, we can get the coordinates of the center of the string using CentroidX /CentroidY, but we can't find out how to get the coordinates of the start point. Hope someone could give us some advice. 



    ------------------------------
    Chinese .
    System & Technology Corporation
    New Taipei City
    ------------------------------


  • 2.  RE: How to get Start X/ Start Y of text string in MapInfo Pro?

    Employee
    Posted 05-28-2024 06:07

    You can get to these coordinates by extracting the Minimum coordinates from the MBR (Minimum Bounding Rectangle) around the text object.

    This query will extract the lower left coordinate for the text:

    Set Coordsys Table N2Text
    
    Select q.*, CreatePoint(ObjectGeography(MBR(OBJ), OBJ_GEO_MINX), ObjectGeography(MBR(OBJ), OBJ_GEO_MINY)) Object
    From N2Text As "q"
    Into Selection

    Here you can see the start point with the text. The Start Point is a purple dot under the two text objects.



    ------------------------------
    Peter Horsbøll Møller
    Principal Presales Consultant | Distinguished Engineer
    Precisely | Trust in Data
    ------------------------------