MapInfo Pro

Expand all | Collapse all

Delete original line features from resulting buffer table

  • 1.  Delete original line features from resulting buffer table

    Posted 26 days ago
    Hello MI,

    I have a need to convert a line objects table (of protected shop frontages) to polygons. I need just 3 metre buffers.

    I've used the Buffer>Buffer Objects function to create a 3 metre buffer for each map object. This works well and carries over the object attributes from the line to the new buffer polygon.

    However, the resulting table still contains the original line objects sitting within the buffer polygons. How do I remove the lines leaving just the polygons?

    Thanks,
    Stuart



    ------------------------------
    Stuart Carter
    Corporate GIS Manager
    Southwark Council
    London
    ------------------------------


  • 2.  RE: Delete original line features from resulting buffer table

    Posted 26 days ago
    Hi Stuart,

    You can select the lines from your table using the following query:

    Select * from YourTable where str$(obj) in ("line","polyline") into lines

    Then delete the lines.  I would also pack the table.

    If you use Buffer --> Buffer Table instead of Buffer Objects, you can create the buffer polygons into a new table.

    ------------------------------
    James Nolet
    Dooley Mitchell & Morrison Pty Ltd
    Mentone, VIC, Australia
    ------------------------------



  • 3.  RE: Delete original line features from resulting buffer table

    Posted 25 days ago

    Hi James,

     

    I'll give all that a go.

     

    Thanks,

    Stuart

     






  • 4.  RE: Delete original line features from resulting buffer table

    Posted 25 days ago

    Stuart,

    Two tips on how to avoid adding objects to the table:

    1. Use Buffer Table

    As @James Nolet said, use the Buffer Table command. This will ask you to select the output table where you can create a new table based on the structure of the input table.


    2. Update the existing records with the (Cartesian)Buffer() function

    You can also use the MapBasic Window, or the new v2019 SQL Window, to update the existing records with a new spatial object. Before doing so, you might want to create a copy of your input table.

    I have used the CartesianBuffer function assuming that your data is based on the British National Grid coordinate system. If it's based on a Longitude/Latitude projection, use the Buffer() function.

    Update Addresses
       Set OBJ = CartesianBuffer(obj, 24, 3, "m")



    ------------------------------
    Peter Horsbøll Møller
    Distinguished Engineer
    Pitney Bowes Software & Data
    ------------------------------