MapInfo Pro

 View Only
  • 1.  DrawTools

    Employee
    Posted 10-14-2022 03:22
    Edited by Peter Møller 01-26-2024 01:20

    A new version of DrawTools, v2.7.1, is about to go live in the MapInfo Marketplace.

    DrawTools comes with features that can be grouped into these groups that you see below.

    Node Features

    • Add Node: Allows you to add a node to a selected polyline at the closest end to where you clicked.
    • Add Start Node: Allows you to add a node to a selected polyline at the start of the polyline.
    • Add End Node: Allows you to add a node to a selected polyline at the end of the polyline.

    All these three tools work in a similar way. First, you need to select a polyline from the editable layer, then you click with the tool where you want the new start/end node to be. The tool will automatically add the new node to the polyline.

    • Remove Start Node: Allows you to delete the start node from the selected polyline.
    • Remove End Node: Allows you to delete the end node from the selected polyline.
    • Set Node Coordinate: Allows you to change existing nodes of a polyline or polygon by entering coordinates for these. See more details below.

      Transform Features

      Add to Region: Allows you to add area to an existing selected polygon. Make sure that the layer is editable. Draw the area/polygon that you want to add to the existing polygon. The drawn polygon will be merged/combined with the existing polygon.

      Remove from Region: Allows you to remove an area from an existing selected polygon. Make sure that the layer is editable. Draw the area/polygon that you want to remove from the existing polygon. The drawn polygon will be used to erase from the existing polygon. This could be holes you want to cut or areas you want to remove.

      Combine Selected into New: This allows you to combine several selected objects and insert the new combined object into the editable layer. Note that the selected records will not be erased and that you can select from any layer, not just the editable layer.

      Add Gaps: Allows you to create small polygons where you click in the map. These polygons will only be created if there is a gap in the polygons in the editable layer where you clicked. The gab will be created as a new polygon in the editable layer.

      Insert Features

      Arrow: Allows you to draw an arrow in the editable layer based on the polygon you draw with the tool. See more below.

      Isosceles Trapezoid: Allows you to draw an isosceles trapezoid in the editable layer using the line created with the tool. See more below.


      Functions

      DrawTools also comes with several functions that can be used from the user interface in MapInfo Pro. These functions can be found in the Functions list in the SQL Window, and you can use them from the MapBasic window and from the Update dialog, too.

      These functions are all discussed in the help file that comes with DrawTools.

      • DTLineDirection
      • DTMath2NorthAngle
      • DTNorth2MathAngle
      • DTCreateCircularSector
      • DTCreateAnnulus

      Source code

      The source code for the application can be found on GitHub: mbDrawTools-x64.

      Questions, requests, and ideas

      If you have questions about the tool, post these as comments to this article.
      Ideas and requests for improvements can be posted as comments too. You can also report these as Issues through GitHub.

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



    • 2.  RE: DrawTools

      Employee
      Posted 09-11-2023 20:01

      DrawTools 3.0.7

      With the release of MapInfo Pro v2023, we also have a new release of DrawTools.

      MapInfo Pro v2023 allows you to access and update the M and Z values on the nodes on polylines and polygons. DrawTools has been extended with tools to help you assign values to the Z and M on your objects and their nodes.

      Extract Nodes

      Select the object for which you want to extract nodes. Now click the Extract Nodes control.

      The nodes will now get extracted into a new table including a reference to the RowID of the object in the original table, the segment number, and the node number. These values can be used if you later want to use the Update ZM Values using Nodes feature.

      The nodes are stored in a temporary table in the Temp folder. Remember to save a copy of this table if you want to keep it. The table will not be maintained in your workspace.

      If the nodes table already exists, you will be asked if you want to overwrite it or add to it. This allows you to extract nodes multiple times during a session.

      Set Node Coordinate

      The Set Node Coordinate tool has been extended to show the M and Z values on the nodes, allowing you to assign values to the M and Z.

      If the editable table supports M and Z values, the Z and M options and fields, will be enabled allowing you to assign values to these fields in the Set Node Coordinate dialog.

      Update MZ Values

      Select the objects you want to update. Make sure you select the features from the editable layer.

      Now click on Update ZM Values in the Nodes dropdown on the Spatial tab.

      In the Update ZM Values dialog, you can now control which values you want to update and how you want to update these values

      .

      First, check the Update Z Values and/or Update M Values option depending on which value you want to update. You can check one of them or both.

      Now select if you want to update using a fixed value or using values in a column. If you check Value, make sure to enter the value to assign to the Z and/or M values on the nodes in the appropriate field. If you check Column, make sure you select the correct column holding the values to assign to the Z and/or M values on the nodes.

      Finally, you can select if you want to set the Z and/or M values on the nodes to the specified value, if you want to add the specified value to the existing value on the nodes, or if you want to multiply the existing value on the nodes by the specified value.

      Click OK to update the M and/or Z values on the nodes.

      Update ZM Values using Nodes

      For this to work, you will need an editable layer. There should also be a table with the postfix of “_Nodes” open. If your editable layer is called Buildings, the table Buildings_Nodes also needs to be open.

      It is recommended to use Extract Nodes to create the Nodes table, but it’s not required. You can create this table in other ways too.

      Click on Update ZM Value using Nodes in the Nodes dropdown on the Spatial tab.

      In the dialog Update MZ Values using Nodes, you must now specify how to update the nodes in the editable layer.
      Select Use M and Z Values from Point Objects to use the M and Z values on the spatial point objects in the Nodes table.

      Alternatively, you can select Use M and Z Values from Column to read the values from columns in the Nodes table. Note that the second method also allows you to select if you want to update the Z value, the M value, or both. For each, you will have to pick the column to read the value from.

      Click OK to update the nodes on the objects in the editable layer.

      Note that it is the Nodes table that controls which records in the editable layer get updated.

      The Nodes table must contain these columns:

      • ·        OBJECT_ID: Refers to the RowID in the editable layer.
      • ·        SEGMENT_ID: refers to the segment for the specific object.
      • ·        NODE_ID: Refers to the node on the specific segment for the specific object.

      The values in these columns control which object, which segment, and which node will get updated.

      This feature can be used to update the Z values on your polylines and polygons with for example the elevation from a digital elevation model. First, you extract the nodes using the Extract Nodes feature of DrawTools. Now you can use Point Inspection in the Raster Processing gallery to update these node points with the elevation from your elevation model. Finally, you can use Update ZM Values using Nodes to assign the value from the elevation model back to the original polyline or polygon.

      Offset in XYZ

      First, select the objects(s) that you want to offset in X, Y and/or Z. Make sure you select the object(s) from the editable layer.

      Now use the Offset XYZ tool to draw a line indicating the distance in X and Y that you want to move the objects. The dialog will afterward allow you to change these values if needed.

      When you have drawn the line, the Offset XYZ dialog will appear.

      The values in the X, m and Y, m fields have been calculated from the line, you drew.
      Modify these and the value in the Z field if necessary.
      Now, check if the calculation method is correct. Use Spherical for Lat/Long based coordinate system, and Cartesian in other cases.

      Finally, you can check the option Create Copies of the Records if you want to create copies of the selected record(s).

      If you check this option, you can also specify how many times. Each time the objects are copied they will be offset by the given values in X, Y, and Z. The first time it will use the values entered. The next time, the values will be multiplied by 2. The third time by 3, and so on.



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


    • 3.  RE: DrawTools

      Employee
      Posted 11-23-2023 07:30

      DrawTools 3.1.0

      DrawTools 3.1.0 is about to go live on the MapInfo Marketplace.

      Dialog for creating Cell Sectors

      Until now you have been able to create Circle Sectors and Annulus (or Doughnut) Sectors using two functions in DrawTools.

      You can find this in the Region dropdown in the Create group on the Spatial tab.

      Now you can also do it through an interface to select the columns or values for creating these objects.

      If the Inner Radius is empty or 0, you will get Circle Sectors. If it's larger than 0 but less than the Outer Radius, you will get Annulus Sectors.

      Set Node Coordinates

      The Set Node Coordinates tool has been improved to support polylines and polygons with multiple segments.
      The dialog now allows you to loop through the segments as well as the nodes of the object.
      You will also notice that it now also allows you to delete an entire segment of the object. A warning dialog will ask you to continue before this happens.
      When you now scroll through the nodes or segments, you can go from the last to the first and from the first to the last.
      When first using the tool to pinpoint the node to start from, the tool uses a different search distance. It will now start with 1/100 of the map zoom and move to 1/10 of the map zoom if no node was found at the first search distance.


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