Post

2 followers Follow
1
Avatar

Trim Layer B to fit within Layer A

Please view the attached image.

Add the ability to select a source polygon layer(Layer A), along with selecting a second source polyline layer(Layer B), and perform an operation that would trim Layer B to fit within Layer A.  This would mean creating points along the polylines(on Layer B) where they intersect with the polygon border(on Layer A), and then trimming(removing) the portion of all the polylines that fall outside of the polygon border.

Thank you,

Eric Jarvies

Eric Jarvies

Please sign in to leave a comment.

3 comments

0
Avatar

Just to verify what you're referring to here.    As opposed to the current Trim functions, that leave features intact, you want this function to trim the features at the edges of the polygon.

A couple of questions: what about splits, in particular when dealing with attributes.    For example: if the polygon is concave and results in a line which bisects both lobes being cut in 4 places, creating 2 segments where there previously was only one.  Should that generate 2 features, or a single multi-line feature?

Similar question for the Polygon case of this?

My first inclination would be to use multi-line or multi-polygon (as appropriate) in order to keep the features consistent.

Gaige B Paulsen 0 votes
Comment actions Permalink
0
Avatar

I am not sure how the "current Trim functions" work... don't seem to have that option on my version of Cartographica.  I do have "Split Selected Features" option, but I've not been able to get it to work with anything I've tried it for.

I am not sure I understand your question entirely, but if you look at the 3 attachments, perhaps that will provide a visual explanation of my request.  In short, where the overlapping Polyline intersects with any portion of the Polygon border, it is assigned a vertice(meaning a vertice is created on that Polyline where the intersection occurs), and then the Polyline is cut into two segment using that intersection vertice as the cutting point, and then the segment that falls outside of the Polygon border is deleted, and the segment that falls within the Polygon border is kept, and hence it maintains what attributes it had to begin with, the only difference is the Polyline is now shorter and contains less segments/vertices.  

Of course, the tool should also do the reverse/opposite, wherein it maintains the Polylines(on Polyline layer) outside of the Polygon(on the Polygon layer) border whilst removing Polylines inside of the Polygon border.  And as a third option, it could simply create the intersection vertice where Polyline and Polygon intersect, and simply cut the Polylines into two segments... segment A inside of Polygon border, and segment B outside of Polygon border, wherein both segments maintain the same attributes, and simply have different/unique feature IDs(obviously).

I would implement in Cartographica like follows:

-User would highlight their Polygon layer, and then select a Polygon Feature on that layer, and then go to EDIT > SELECT ON ANOTHER LAYER

-User would then select the Polyline layer from the list, and open doing so would be given various options, such as; 1.)Trim Outside, 2.)Trim Inside, 3.)Split into two Segments(Inside/Outside).  

The user may also be given the opportunity to Create New Layer from results, or apply results to the same Polyline Source layer.  Of course, the Polygon layer is never effected, as it is only ever used to define the Border(inside area or outside area) for which the Polylines are to be trimmed out of or into.

Does this make sense?

 

Thanks,

Eric Jarvies

Eric Jarvies 0 votes
Comment actions Permalink
0
Avatar

Cartographica 1.4 contains many new options for this:

  • Map > Trim map to area of selected feature now does what you expect (trimming and removing individual geometry) instead of trimming to objects that overlap without trimming the geometry
  • The new Tools > Perform Overlay Operation… for Erase and Clip provide more complex layer-level versions of this capability
Gaige B Paulsen 0 votes
Comment actions Permalink