MapInfo Pro

 View Only
  • 1.  Show the centroids

    Posted 23 days ago
    Good morning,
    When I draw circles or segments, the center of these objects does not appear.
    The "display centroids" option is however activated... I would like to know if it is possible to make them appear easily.. THANKS


    ------------------------------
    Thomas Delaire
    Knowledge Community Shared Account
    ------------------------------


  • 2.  RE: Show the centroids

    Employee
    Posted 23 days ago

    Hi Thomas

    It seems we only display the centroid for region/polygon objects.

    We don't display them for points, lines, polylines, or any of the cosmetic objects such as rectangles and ellipses.

    Depending on why you want to see them, you can run a query to extract the centroid and in this way show them as a point layer.

    In the image above, you can see the result of this small script which I run in the MapBasic window. You can also run it through the SQL Window and so store it as a script.
    Set Coordsys Table CosmeticLayer 
    Select t.*, Centroid(t.obj) Object From CosmeticLayer As "t" Into _centroids NoSelect
    Add Map Layer _centroids
    Set Map Window FrontWindow() Layer _centroids Display Global Global Symbol (35,16744448,10,"MapInfo Symbols",256,0)

    CosmeticLayer is the name of my table.

    I use the MapBasic function Centroid(t.obj) to extract the centroid from the objects, and the Object keyword tells MapInfo Pro to treat this spatial expression as the object in the resulting query.

    The last two lines add the resulting query to my map and set an override style for the layer.



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



  • 3.  RE: Show the centroids

    Posted 23 days ago
    yes, thank you Peter but this solution is very technical :)
    
    It would make people's lives a lot easier if the centers of the segments appeared by clicking on "show Centroids"... 
    
    Thank you for your response.
    
    


    ------------------------------
    Thomas Delaire
    Knowledge Community Shared Account
    ------------------------------



  • 4.  RE: Show the centroids

    Employee
    Posted 23 days ago

    A very fair point, Thomas. My solution is a bit more technical than checking on Options :-)

    Sometimes I just get used to the way things are that I don't see they could be any different

    Can I ask you to add your suggestion to Precisely Ideas, please?

    And please also add some details about why this is important to you. Why do you need to see the centroid, for example?

    Thanks



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