MapInfo Pro

 View Only
  • 1.  Best Tool for Splitting Polylines for MIP V17

    Posted 09-04-2018 04:23

    I have been using the attached tool in the past, it appears in V17 that there maybe some limitations as to number of segments possible to create. I tried splitting a 12 kilometre long polyline into 5m segments but the process stopped at 78 segments.

    Any ideas for the best tool for MIP V17?

    Regards,

    Tony Jordan?



  • 2.  RE: Best Tool for Splitting Polylines for MIP V17

    Employee
    Posted 09-27-2018 03:12

    Sounds weird to stop after 78 segments.

    We haven't changed any limitations to the number of segments - at least not lowering the number and it's been quite a few years since we made the latest changes here.

    Does the tool work with the same data in MapInfo Pro 15.0?



  • 3.  RE: Best Tool for Splitting Polylines for MIP V17

    Employee
    Posted 10-03-2018 10:01

    @Tony Jordan?, I noticed we fixed a bug with Split Polyline at Node statement in MapInfo Pro 17.0.1.

    Have you tried to see if that also makes the tool work better? 



  • 4.  RE: Best Tool for Splitting Polylines for MIP V17

    Posted 10-03-2018 20:37
      |   view attached

    ?Hi Peter,

    I am using V17 Release Build 71. I am getting the errors as attached in screen shots.

    Tony



  • 5.  RE: Best Tool for Splitting Polylines for MIP V17

    Posted 10-03-2018 20:37
      |   view attached


  • 6.  RE: Best Tool for Splitting Polylines for MIP V17

    Posted 10-03-2018 22:05

    Hi Tony,

    The divide by zero error will be due to the line having two sequential nodes at exactly the same location - check segment 78.

    I'd say the first error is due to an unpacked table. The "Trws = TableInfo(tabname, TAB_INFO_NROWS )" line before the Fetch statement on 273 will include deleted rows when retrieving the number of rows in the table. Actually (without going through the code in details), even if the table was initially packed, the "AllSplit" routine might have unintended consequences because you are looping through the table and altering objects within the table at the same time. Although this might work out in this case, it is probably best avoided.

    Also error control seems to be poorly written. When the error occurs on line 273 (the "AllSplit" routine, the program will end up executing the "SplitLine" routine I believe - hence the second error.

    Perhaps another line splitting tool is the way to go...

    I hope this helps.



  • 7.  RE: Best Tool for Splitting Polylines for MIP V17

    Posted 10-04-2018 00:52

    Thanks James. Yes I am open to using another Line Split tool, it has to be able to segment many/multiple segments from one selected line?.

    Maybe if someone is reading this that has a suggestion please give me your thoughts on other tool choices.

    Regards,

    Tony Jordan