Transform - Geometry: Split

The Split template appears in the template list when a geometry field, of type geom, geommfd, or geomwkb, has been picked in the Transform pane.   It decomposes objects into constituent elements or pieces.

 

Split

Decompose objects into constituent elements as specified in the Split into box and parameter options, and save into the specified Result destination using the specified geometry type.  Split into options are:

 

  • branches - Split branched objects into separate objects for each branch.  Creates areas from holes in areas as well as an area object with filled holes.  Use the shapes operation to retain holes in areas.
  • convex parts - For areas only, decompose each area into smaller area objects such that each smaller area is a convex hull for the locations it encloses.  There usually are many possible such decompositions of a larger area into smaller areas.  The algorithm used generates one such decomposition.
  • coordinates - For each coordinate of every object create a single point object.
  • line coordinates - For lines only.  Given a  Start distance, an End distance, and a distance Step in the specified unit of measure, creates a sequence of points on the line from start to end at the specified step distances. Works with lines composed of straight line segments, converting any curvilinear segments to straight line segments on the fly.  The operation follows branches in order. If the maximum distance given is longer than the first branch, measurements continue into the second branch, and then into the third, and so on until the maximum distance is reached.  Also works using a negative distance for Step and setting the Start distance to be greater than the End distance, although that is conceptually more confusing than beginning at the Start and using positive Step distances. Uses the GeomToCoordsLineSequence SQL function.
  • line parts - For lines only.  Given a  Start distance, an End distance, and a distance Step in the specified unit of measure, creates a sequence of lines on the line from start to end at the specified step distances. Works with lines composed of straight line segments, converting any curvilinear segments to straight line segments on the fly.   Similar to line coordinates for how it works with branches and negative Step distances.
  • parts -  Splits areas and lines into parts using areas or lines in a different drawing.
  • segments - For each segment of every line or area boundary create an equivalent line object.
  • shapes - For areas.  A shape is a branch of an area that forms an island.  A shape is also referred to as an individual polygon within a multipolygon object.  For each shape of every area create a separate area.  Points and lines are copied unchanged except that any curved segments in lines are replaced by straight segments.   This operation decomposes areas to shapes using OGC rules for coordinate ordering with the GeomToShapes SQL function.  
  • shapes (ESRI non-OGC) - The same as the shapes operation, but using ESRI rules for coordinate ordering using the GeomToShapesEsri SQL function.  
  • triangles -  For areas only.  Perform a Delaunay triangulation of areas to create triangular areas that tile the original area.  Curved segments in area boundaries are replaced on the fly by straight line segments prior to triangulation.  Lines and points are discarded.

 

Launch the template by choosing a geometry field and then double-clicking the Split template.  When the template launches we can specify options.

 

 

Split : branches

 

Split : shapes

 

Split : shapes (ESRI non-OGC)

The Split transform template with the branch option takes each branch of every object in the source geometry field and creates a new record for that branch in the Result destination.  It always creates a new table and new drawing for the result.

 

The shapes and shapes (ESRI non-OGC) are special case implementations for areas that do not split branches which are used to represent  holes within areas.  Those branches are retained, so areas with holes in them will still have holes, but any branches in areas that are used to represent islands will be split so that each island becomes a separate object.

 

The difference between shapes and shapes (ESRI non-OGC) is that the shapes option produces areas in which the order of coordinates defining borders conforms to OGC rules, while the shapes (ESRI non-OGC) option produces areas in which the order of coordinates defining borders conforms to ESRI rules, which are different than OGC rules.

 

Consider a drawing that has one area object that consists of four branches, the classic way of building an area object that has islands.   See the Example: Create an Area with Holes and Islands topic for an example.

 

 

Even though the drawing appears to show four separate objects, the drawing's table shows only one record.  We can tell the areas in the drawing are all the same object (and thus the same record) by Ctrl-clicking on any one of them to select it.

 

 

A Ctrl-click on any of the areas automatically selects all of them in the drawing, and also selects the one record in the table, showing they are all branches of a single area object.

 

To split the single, branched area object into its constituent branches, each branch becoming a separate object, with the focus on the Misc Objects Drawing (or the table), we choose the Geom field and then the Split template.

 

 

In the Split template we choose branches as the Split into option.   The only Result option is (new table).   We specify the name Split into Branches for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

The one area object record now becomes four area object records in the result.

 

If we open the newly created drawing it appears the same, since the areas drawn will have the same appearance if they are four branches that are all part of the same, single, area object or if they are four different areas created by splitting the branches into four separate area objects.

 

 

In addition to seeing the four records in the new table we can tell what we now see are separate objects by Ctrl-clicking on one of them to select it.

 

 

That we can select only one with a Ctrl-click indicates it is a separate object.  In the table only one record is selected, the record for the selected area.

 

See the Notes at the end of the Transform Pane topic for a discussion and illustration of how the points created by Convert : point are multipoints but the points created by Split : coordinates are all separate points in separate records, a similar effect to how the Split : branches template creates additional records to handle the decomposition of branches into additional records.

Splitting into Shapes

We can see the difference between splitting into branches and splitting into shapes by using a drawing that has a single, branched area object that in addition to islands also has holes in some of those islands.

 

 

The drawing illustrated above has holes in three of the islands.    Everything seen in the drawing is part of a single, branched area object.  

 

With the focus on the Misc Objects with Holes Drawing we choose the Geom field and then the Split template.

 

 

In the Split template we choose branches as the Split into option.   The only Result option is (new table).   We specify the name Split all Branches for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

 

The one area object record now becomes seven area object records in the result.   Three of the resulting area objects are areas created from the branches that defined the holes, while four of the resulting area objects are areas created from branches that defined the outer boundaries of the original area islands.

 

 

We Ctrl-click the last record in the table to select that object, which is the area created from the hole within that island.    We press Edit - Delete to delete that record.

 

 

By deleting the area that was created from the hole, we can show how that "hole" area object overlapped and was above the area object that was created from the boundary branch for that island.   That area object was created with no hole in it.  

 

When splitting areas into their branches, branches which define holes become separate new areas, and branches that defined islands that had holes in them become separate new areas without any holes.     That is often something we do not want, in that we would like branched areas to be split into their islands, but for the islands to retain any holes.

 

To do that, we use the Split template with the shape or shape (ESRI non-OGC) options.  

 

With the focus on the original Misc Objects with Holes Drawing we choose the Geom field and then the Split template.

 

 

In the Split template we choose shapes as the Split into option.   The only Result option is (new table).   We specify the name Split into Shapes for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

 

The result in the drawing appears exactly the same as the original.   However, in the table we can see that what once was a single area object has been split into four separate area objects.

 

 

Ctrl-clicking one of them to select it, we see that the four separate area objects were constructed from what were four islands in the original multi-branched area object, but with the holes in those islands retained.   The original, single area object was split into four constituent shapes and not split all the way down to all constituent branches.

 

Split : convex parts

The Split template using the convex parts option splits each area in the source field into smaller area objects such that each smaller area is a convex hull for the locations it encloses, and creates a new record for each such smaller area in a new table and drawing.  There are many possible such decompositions of a larger area into smaller areas.  The algorithm used generates one such decomposition.

 

 

Consider an area object shaped like the above illustration.    With the focus on the Sample Area drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the convex parts option.    The only Result option is (new table).   We specify the name Convex Parts for the drawing and an analogous name for the table.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

 

The resulting Convex Parts drawing, which we have added as a layer to the original Sample Area drawing and have styled in a light green color, shows how the original area can be split into smaller areas so that each smaller area is a convex hull for any locations within.   

 

The mathematical definition of convex hull is usually explained by the more intuitive notion of the shape a rubber band would take when stretched around the outside of pins placed at all the coordinates that define the object.

 

Using Split : convex parts

 

This template is often used to split area objects into smaller areas to allow computations on more manageable objects or to create centroids that fall within areas.

 

 

With some areas, as seen above, a centroid may occur outside of the area. If centroids are created to allow transfer of values from areas to points via Join operations for analytic or other purposes, the centroid point might not fall within the desired area. One approach to solving this problem is to split each area into smaller areas and to then create centroids for those smaller areas.

 

 

We use Split with the convex parts option to create the above set of smaller areas from the original area.  All of the smaller areas are a convex hull for all locations within, so a centroid using weight (area) created for any of the smaller areas will fall within the smaller area.

 

 With the focus on the Convex Parts drawing, in the Transform pane we choose the Geom field and then we choose the Center template.

 

 

In the Center template we choose the weight (area) option.  For the Result destination we choose New Field, to create a new geometry field in the table, using the name centroids.  We specify Convex parts centroids as the name of the new drawing to be created to show the new geometry field.  Press Transform.

 

 

Dragging and dropping the new Convex parts centroids drawing as a layer into the Convex Parts drawing, we see that each centroid falls within the area from which it was created.

 

Split : coordinates

The Split template using the coordinates option creates for each coordinate of every object in the source geometry field a single point object in the specified Result destination.  The Result destination will always be a new table and drawing.

 

 

We use the example Objects Drawing.    The original table with seven records (three areas, two lines, and two points) as seen above will in the new drawing and table be a table with 26 records, all of which have a single point in their geometry field.

 

 With the focus on the Objects Drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the coordinates option.    The only Result option is (new table).   We specify the name Object coordinates for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

 

The drawing for the new component shows the points, and the table shows the many records that have been created.  

 

We can see the relationship between the newly-created coordinate points and the originating objects by showing the two together.

 

 

The newly-created coordinates points are symbolized above as small rings (using a round point symbol with a transparent fill color and a blue stroke color) , to better show the locations of the vertices of objects at which they were created.  The Objects Drawing layer is shown with 50% opacity in the Layers pane, to better show the coordinates points in the layer above.

 

See the Notes at the end of the Transform Pane topic for a discussion and illustration of how the points created by Convert : point are multipoints but the points created by Split : coordinates are all separate points in separate records.

 

Split: line coordinates

For lines only.  The Split template using the line coordinates option when given a line object, a minimum position, Start, a maximum position, End, and a Step, creates a sequence of points on the line from Start to End at the specified Step distance between points. Works with lines composed of straight line segments, but not curvilinear segments. The template follows branches in order. If the maximum distance given is longer than the first branch, measurements continue into the second branch, and then into the third, and so on until the maximum distance is reached.  Internally uses the GeomToCoordsLineSequence SQL function.

 

 

We begin with a drawing that contains two line objects and three area objects.  Lines in the drawing start at the left and end toward the right of the drawing.

 

With the focus on the Lines and Areas drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the line coordinates option.    

 

The Start position will be 0, that is, the beginning of the line, and the End position will be 900, a value we know is longer than either of the two lines given the unit of measure (meters) we intend to use.  For a Step distance we use 30.   The drawing is in Pseudo-Mercator projection so we can use whatever linear unit of measure we want in the Unit box.  We will choose Meter from the long list of available units.

 

The only Result option is (new table).   We specify the name Line coords for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

 

The template creates a new Line coords drawing and table.   We drag and drop the new Line coords drawing as a layer into our Lines and Areas drawing and we Style the points in bright green color.

 

The Line coords drawing shows the result: areas are discarded and the two lines are converted into a series of point objects, starting from the beginning of the line and then placed every 30 meters along the line to the end, or to a total distance of 900 meters, whichever comes first.

Using an Expression to Specify the End

If we want the template to operate all the way to the end of the line, instead of just guessing at a large value which we feel sure is longer than all of the lines in our drawing, a  more elegant way to specify the End position is to use an expression.

 

 

Clicking on the 123 portion of the End box provides a pull down menu that allows us to chose any of the fields in the drawing's table, or a value box to allow us to enter a specific value (the default) or to enter an expression.  

 

The expression GeomLength([Geom], 0) uses the GeomLength SQL function to report the length of the line.  Entering that expression into the End box says to use the length of the line, that is, all the way to the end of the line.

 

Press Preview to see what that does:

 

 

The preview shows that points from the beginning to the end of each line will be created with a step of 30.

Counting Backwards

Just like the GeomToCoordsLineSequence SQL function that powers the Split: line coordinates operation,  the template allows us to create point sequences counting backwards from the specified End position by using a negative value for Step.

 

 

In this case we use 900 for the Start position and 0 for the End position with a Step of -30.   We save the Result into a drawing and table called Line coords -step.   Press Transform.

 

 

The result is the same.   

Creating Points towards the End

If we would like to create points towards the end of a line and not at the beginning, we can use expressions in both the Start and End boxes.

 

 

In the illustration above, the expression in the End box is the same GeomLength([Geom], 0) we used earlier to specify the end of the line.

 

The expression GeomLength([Geom], 0) - 300 takes the end of the line and subtracts 300 meters in length.   If we use that expression for the Start of the sequence, we create points every 30 meters starting 300 meters from the end of the line all the way to the end of the line.

 

Pressing Preview shows what that will do:

 

Branched Lines

The line coordinates operation also works with branched lines, following branches in order similar to how Copy: coordinate xy works.

 

 

Consider the example above, showing a single, multi-branched line with branches labeled in the order in which they occur within the line object.   Branches 1, 2, and 3 follow what might be an expected order from the start of the line to descendent branches, but then branch 4 appears at the fork with branch 2, and branch 5 appears at the fork with branch 3.

 

With the focus on the Branched Lines drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the line coordinates option.    

 

The Start position will be 0, that is, the beginning of the line, and the End position will be 1000, a value we know is longer in meters than the first three branches.    For a Step distance we use 20.   We again use Meter as the unit of measure in the Unit box.  

 

The only Result option is (new table).   We specify the name Branch coords for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

 

Dropping the new Branch coords drawing as a layer into our Branched Lines drawing, we see the branched line is replaced with a series of point objects, starting at the beginning of the line with a point placed every 20 meters when following the line through branches 1, 2, and 3, and then into branch 4 until a total distance of 1000 meters has been followed.

Picking a Single Coordinate Location

Although the line coordinates option is often used to generate multiple points along a line, we can use it to create just a single coordinate by simply specifying the Start and End to be the same number, the distance desired from the beginning of the line, and the Step to be any positive number, such as 1.

 

We start with the same sample drawing composed of line and area objects.

 

 

With the focus on the drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the line coordinates option.    

 

The Start position will be 0, that is, the beginning of the line, and the End position also will be 0.    For a Step distance we use 1.  We could use any positive number, since the sequence of points to be created will start and end with a single point.  We use Meter as the unit of measure in the Unit box.  

 

The only Result option is (new table).   We specify the name Coord 0 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

A new Coord 0 drawing and table appear in the project.  We drag and drop the new Coord 0 drawing as a layer into the Lines and Areas drawing, and color the point in the new layer a bright green.

 

 

The new drawing shows a single point, placed on each line at a distance of 0 meters from the beginning, that is, the location of the very beginning of each line.  Objects such as areas and points are ignored by the template.

 

Note that another way to place a point at the very beginning of each line is to use the Copy : coordinate xy operation with a Value of 0.   That transform picks out coordinates which define the line, allowing us to pick out the first, second, third, and so forth (zero based counting) coordinate that defines the line.   The Split : line coordinates transform operation in contrast generates points based on a linear distance from the beginning of the line, and not by the sequence number of a coordinate in the list of coordinates that defines the line.

 

We can re-run the transform using a different value for Start and End to create a point at a different linear distance along each line.

 

 

We use Start and End values of 200.    For a Step distance we continue to use 1.  We leave Meter as the unit of measure in the Unit box.  

 

We specify the name Coord 200 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

A new Coord 200 drawing and table appear in the project.  We drag and drop the new Coord 200 layer into the Lines and Areas drawing, and color the point in the new layer a bright magenta.

 

 

In the new drawing, a point has been created on each line 200 meters in distance from the beginning of the line.  

Single Coordinate for Branched Lines

Using Line Coordinate to follow branches can become topologically complex, because distance is computed along branches in the order in which they occur in an object.

 

We start with the same Branched Lines drawing used before, showing a single, multi-branched line with branches labeled in the order in which they occur within the line object.

 

 

Branches 1, 2, and 3 follow in order from the start of the line to descendent branches, but then branch 4 appears at the fork with branch 2, and branch 5 appears at the fork with branch 3.

 

With the focus on the drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

We use Start and End values of 800.    For a Step distance we continue to use 1.  We leave Meter as the unit of measure in the Unit box.  

 

We specify the name Coord 800 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

A new Coord 800 drawing and table appear in the project.  We drag and drop the new Coord 800 layer into the drawing, and color the point in the new layer a bright green.

 

 

800 meters is longer than the first branch, so the distance continues to be measured into branch 2, and then continues even further to near the end of branch 3, where the point is finally plotted.

 

We repeat the transform, plotting a point 850 meters in distance from the beginning of the line.

 

 

We use Start and End values of 850.    For a Step distance we continue to use 1.  We leave Meter as the unit of measure in the Unit box.  

 

We specify the name Coord 850 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

A new Coord 850 drawing and table appear in the project.  We drag and drop the new Coord 850 layer into the drawing, and color the point in the new layer a bright magenta.

 

 

We see that adding 50 more meters to the distance goes beyond the end of branch 3 and continues from the beginning of branch 4.  But that is a counter-intuitive result if we think in terms of the distance from the beginning of branch 1 and making a right turn at the first fork directly into branch 4.    Therefore, it is usually not a good idea to use Split : line coordinates with multi-branched lines.

Creating a Single Coordinate from the End of a Line

To create a single coordinate, we enter the same value or expression into both the Start and End boxes.  To create that single coordinate from the end of the line, we use an expression using the GeomLength function that specifies how far it should be from the end.

 

Suppose, for example, we would like to create a single point 90 meters from the end of each line:

 

 

The expression GeomLength([Geom], 0) - 90 takes the end of the line and subtracts 90 meters in length.   If we use that expression for both the Start and the End of the sequence, we create a single point 90 meters from the end of each line.   We can use 1 for the Step since only a single point will be created.

 

We press Preview to see how that will work:

 

 

The preview shows a single point created 90 meters from the end of each line.

 

 

Split: line parts

For lines only.  The Split template using the line parts option when given a line object, a minimum position, Start, a maximum position, End, and a Step, creates a sequence of new line objects on the line from Start to End at the specified Step distance between points. Works with lines composed of straight line segments, but not curvilinear segments. The template follows branches in order. If the maximum distance given is longer than the first branch, measurements continue into the second branch, and then into the third, and so on until the maximum distance is reached.   Options and behavior are similar to the line coordinates option in terms of allowing negative step and  continuation into branches.

 

 

We begin with a drawing that contains two line objects and three area objects.

 

With the focus on the Lines and Areas drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the line parts option.    

 

The Start position will be 0, that is, the beginning of the line, and the End position will be 900, a value we know is longer than either of the two lines given the unit of measure (meters) we intend to use.  For a Step distance we use 100.   The drawing is in Pseudo-Mercator projection so we can use whatever linear unit of measure we want in the Unit box.  We will choose Meter from the long list of available units.

 

The only Result option is (new table).   We specify the name Line parts 100 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   

 

Press Transform.

 

The template creates a new Line parts 10 drawing and table in the Project pane.

 

 

We drag and drop the new Line parts 10 drawing as a layer into our Lines and Areas drawing.   We Style the lines in bright green color, using an End symbol that is a small triangle to show where each line object ends.   

 

In the illustration above we have Ctrl-clicked two of the line objects to select them, to show how the Line parts 10 drawing has transformed each of the two original lines into a sequence of independent line objects, each 100 meters long, or less if the remainder of the line is less than 100 meters.  Objects such as areas and points are ignored by the template.

Creating a Single Line Part

Although the line parts option is often used to generate multiple lines along a line, we can use it to create just a single line at the beginning of the source line by simply specifying the Start to be the desired length, the End to be 0 and the Step to be a negative number of the desired length.

 

We start with the same sample drawing composed of line and area objects.  We will create lines that are 300 meters long at the beginning of each source line.

 

 

With the focus on the drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the line parts option.    

 

The Start position will be 300, that is, 300 meters from the beginning of the line, and the End position will be 0, that is, the beginning of the line.   For a Step distance we use -300.   We use Meter as the unit of measure in the Unit box.  

 

The only Result option is (new table).   We specify the name Line parts -300 for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

A new Line parts -300 drawing and table appear in the project.

 

 

We drag and drop the new Line parts -300 drawing as a layer into our Lines and Areas drawing.   We Style the lines in bright green color, using an End symbol that is a small triangle to show where each line object ends and a Begin symbol that is a small square to show where each line object begins.   

 

Each of the two original lines has been transformed into a single line object at the beginning of the original line that follows along the original line to a length of 300 meters.  Objects such as areas and points are ignored by the template.

 

Split : parts

Splits areas and lines into parts (also called cuts) using areas or lines in a different drawing.

 

 

We use an example map with two vector drawing layers, a Texas layer that shows the state of Texas as a single area object, and an Objects layer that contains two area objects and two lines.   The Objects layer is shown with partial opacity so the regions of overlap with Texas are visible.

 

With the focus on the map, in the Transform pane we choose the Texas drawing and the Geom field.  

 

 

We then choose the Split template.

 

 

In the Split template we choose the parts operation.   For the Result we choose New Table, and then we enter Texas parts for the name of the New drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  The name could be anything, but we will use a name that reminds us of the operation used to create the drawing.

 

Press Transform.  

 

A new drawing called Texas parts appears in the Project pane along with the new drawing's table.  We drag and drop the new Texas parts drawing into the Map, and we style it with a thematic format that uses a different color for each mfd_id value

 

What started as a single area object for Texas has been split into six area objects, the splits being done along the borders of areas and the lines.

Splitting with a Selection

If we like we can use only a subset of selected objects to split Texas, by checking the Cut with selection only box.

 

 

In the illustration above we have selected the two lines in the Objects drawing.

 

 

We re-run the transform, but this time we check the Split with selection only box and use a Texas selected parts name for the new drawing and table we create.   Press Transform.  

 

A new Texas selected parts drawing appears in the Project pane.   We drag and drop it into the into the Map, and we style it with a thematic format that uses a different color for each mfd_id value.

 

What started as a single area object for Texas has been split into three area objects, the splits being done along the selected lines.

Splitting Lines

The examples above show how the cuts operation can split areas.  The same cuts transform operation also can simultaneously split both areas and lines.  

 

 

The illustration above uses a version of the Objects dialog that uses only two area objects, for a clearer illustration.   The star shaped area has been selected.  

 

The lower layer is a version of the Texas layer that also has line objects within the layer showing interstate highways as well as the area object that represents Texas.   Unlike older GIS packages like Arc, which can only have a single object type in a layer, Manifold can mix points, lines and area objects within the same vector layer.

 

The highway lines have been selected in that layer.

 

 

We re-run the parts operation, but this time in addition to checking the Split with selection only box, we also check the Transform selection only box.   Only the selected, star-shaped area object will be used as a cutter, and only the selected highway lines will be cut.     We use Star cut highways as the name for the new drawing and table.

 

Press Transform.  

 

A new Star cut highways drawing and table appear in the Project pane.   We drag and drop the Star cut highways drawing into the Map.

 

 

The view above shows the Star cut highways layer in the map, zoomed in to better see highways in the region of the star-shaped object.   We have selected highways within the star-shaped object, to show how the cut operation neatly cut all highway lines exactly on the border of the star-shaped object.

Example

Splitting lines with areas is a very common GIS task.

 

 

In the illustration above we have a vector layer of US interstate highways as lines and a vector layer of US states as areas.  The highway lines are often contiguous highway lines that cross state boundaries.  We would like to split all highway lines by state boundaries, so we can select only interstate highways within a particular state.

 

With the focus on the map, in the Transform pane we choose the Interstates layer and the Geom field.  We choose the Split template.

 

 

In the Split template we choose the parts operation.   For the Result we choose New Table, and then we enter Highways by state for the name of the New drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.

 

Press Transform.  

 

A new drawing called Highways by state appears in the Project pane along with the new drawing's table.  We drag and drop the new Highways by state drawing into the Map.

 

 

We zoom into the map and select all highways within the state of Colorado, to show how highway lines neatly have been split exactly at the boundaries of states.

 

See the Example: Split Highways by States topic for a more extensive example.

 

Split : segments

The Split template using the segments option for each segment of every object in the source geometry field creates a new straight line object for that segment in the specified Result destination.  The Result destination will always be a new table and drawing.

 

This necessarily converts areas into their boundary line segments and also discards points, which have no segments.  See the Editing Drawings topic for an example of how line objects are created from segments.

 

We start with an example drawing with three areas, two lines and two points.

 

We can see the line objects, although composed of segments like all lines, are each a single object by Ctrl-clicking on any part of a line.  That selects the entire line.

 

 

Opening the drawing's table we can see records for the various areas, lines and points, including the selected record for the selected line.

 

With the focus on the drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the segments option.    The only Result option is (new table).   We specify the name Object segments for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.  Press Transform.

 

We drag and drop the new Objects segments drawing as a layer into the Objects Drawing window.

 

 

The table now contains only line objects, and the line objects in the drawing are arranged in the shape of the areas and lines from which they were created.  The points are gone since points have no segments into which they can be decomposed.  Only areas and lines have segments.

 

We can Ctrl-click to click on different lines to select them, to see that what appear to be single line objects instead consist of multiple line objects that are arranged end-to-end, and thus appear to be a single line.

 

 

For example, what appears to be a single wide "w" shaped line in the lower left is composed of four separate line objects, each of which is located at the exact position of each of the original line's four straight segments.   We can Ctrl-click one of those lines to select it to show that it can be selected without also selecting the other four lines.

 

The drawing's table shows the various records that are selected, corresponding to the individual lines selected in the drawing as illustrated above.

 

See the Notes at the end of the Transform Pane topic for a discussion and illustration of how the points created by Convert : point are multipoints but the points created by Split : coordinates are all separate points in separate records, a similar effect to how the Split : segments template creates additional records to handle the decomposition of segments into additional records.

 

Split : shapes

 

Split : shapes (ESRI non-OGC)

A shape is a branch of an area that forms an island.  It is also referred to as an individual polygon within a multipolygon object.  The Split template using the shapes option for each shape of every object in the source geometry field create a new record for that shape in the specified Result destination.  The Result destination will always be a new table and drawing.  Points and lines are unchanged except that any curved segments in lines are replaced by straight segments.   

 

The difference between shapes and shapes (ESRI non-OGC) is that the shapes option produces areas in which the order of coordinates defining borders conforms to OGC rules, while the shapes (ESRI non-OGC) option produces areas in which the order of coordinates conforms to ESRI rules, which are different than OGC rules.

 

We start with an example drawing that contains a single area.   Two of the branches form "holes" in the area while two of the branches form islands.

 

 

If we Ctrl-click on the middle island seen above to select it we see that the entire area is selected.

 

 

We can also verify there is only one object by opening the drawing's table, to see a single, selected record, corresponding to the single, selected multibranched area in the drawing.

 

With the focus on the drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the shapes option.    The only Result option is (new table).   We specify the name Island Shapes for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like.   Press Transform.

 

 

A new Island Shapes drawing and table appear in the Project pane.  We drag and drop the new Island Shapes drawing as a layer into the Islands Drawing window.   The objects appear to be unchanged, but in the newly created table we see that the table now contains three area objects.  

 

The original multipolygon has been split into its constituent shapes, which consist of one larger polygon that has two holes and the two smaller polygons that were islands.

 

 

If we  Ctrl-click on the middle area to select it we can select just that area and not the others, because it is now no longer part of a single, branched area.  The table shows that one, and only one, of the records has been selected, corresponding to the area that was selected in the drawing.

 

The Split : shapes operation splits areas into shapes using OGC rules with the GeomToShapes SQL function.   To decompose areas to shapes using ESRI rules, in the Transform pane choose the shapes (ESRI non-OGC) option, which internally uses the GeomToShapesEsri SQL function.

 

Split : triangles

For areas only.  Perform a Delaunay triangulation of areas to create triangular areas that tile the original area.  Curved segments in area boundaries are replaced on the fly by straight line segments prior to triangulation.  Lines and points are discarded.

 

 

Consider an area object shaped like the above illustration.    With the focus on the Sample Area drawing, in the Transform pane we choose the Geom field and then we choose the Split template.

 

 

In the Split template we choose the triangles option.    The only Result option is (new table).   We specify the name Split triangles for the drawing.  As we enter the name for the drawing, the pane will automatically fill in an analogous name for the table.   We can change that if we like. 

 

Press Transform.

 

 

The resulting Split triangles drawing, which we have added as a layer to the original Sample Area drawing and have styled in a light green color, shows how the original area can be tiled with triangular areas.

 

Note that since the triangles operation replaces curvilinear segments with straight line segments, if we have large curves and we want to retain a reasonable representation of those curved portions of areas with triangles, we should first replace those curves with a suitable number of straight segments, using the Clean : remove curves transform operation.

 

 

Notes

Curvilinear segments - As a practical matter, most people doing GIS will use straight line segments for lines and areas.   Few GIS systems do a good job of supporting curved segments, so there is much less data published using curved segments.   Manifold's ability to work with curved segments allows us to use that data within Manifold in a limited way, at least for display and interactive editing.  

 

However, most processing tools in Manifold, such as Transform templates and various Geom SQL functions, do their work by first converting a curvilinear segment into a straight line segment between the same two start and finish coordinates.  That will often lead to weird or otherwise unexpected results.  To avoid such problems, first convert curvilinear segments into equivalent constellations of straight line segments at whatever resolution is desired, using the Clean transform template with the convert curves to lines operation option and the number of linear segments desired to approximate the curve in the Curve limit parameter.   See the Curved Segments discussion in the Drawings topic.

 

See Also

Transform Pane

 

Transform Reference

 

Transform - Expression

 

Transform - Geometry

 

Example: Split Highways by States -  We use the Split template cut operation to split interstate highways in the US by boundaries of US states, and then we transfer a state name to highway lines within that state by using the Join dialog.