Inkscape.org
Beginners' Questions How to remove nodes outside the drawing page boundaries?
  1. #1
    Mark D'Agosta Mark D'Agosta @mdagosta

    I used OpenStreetMap to extract a portion of the Maine coastline. Then I did a Clip... Set...  to trim it down to only the area I want to see.  However, there are still nodes outside the drawing page that I can't get rid of (basically, the entire Maine coastline along with islands, etc.)  Every time I try to do anything, Inkscape freezes up and I have to kill it via Windows Task Manager. How can I delete all nodes outside the drawing page?

    Thanks,

    Mark

     

  2. #2
    brynn brynn @brynn

    Inkscape's clipping is not the same thing as cropping.  Clipping only hides the part of the image that you don't want to see.

    If Inkscape is freezing when you try to edit, then likely the file is too large for the resources provided by your computer.

    There might be some way to get rid of the unwanted contents, rather than hiding them.  But if the file is already too large for you to handle, I'm not sure if they could be accomplished.

    Possibly one of the boolean path operations could get rid of the unwanted content.  Or possibly you could edit manually with the Node tool.  If you could show us the image, we might be able to come up with a solution.  (Or if you're very lucky, someone with a big, fast computer might do it for you, if it can be done quickly and easily by any method.)

    Or another option might be for you to go back to the map, and save the very smallest section you can possibly save.

  3. #3
    Mark D'Agosta Mark D'Agosta @mdagosta

    Thanks brynn.  My computer is pretty powerful, but I guess not powerful enough. I think the real problem is that, even though OpenStreetMap allows you to specify a small rectangular area for download to svg, it still captures a large area around the rectangle I've selected.  In any case, I've attached a screenshot of the image, and if anyone has another idea or a computer powerful enough to handle the cropping of the excess nodes, please let me know.

    Inkscape Problem
  4. #4
    Tyler Durden Tyler Durden @TylerDurden
    *

    There's a trick... don't enter node-editing mode.

     

    (My computer is no duffer, but it should work for about anybody, if nodes are not displayed.)

     

    Have a nice day.

    TD

  5. #5
    Mark D'Agosta Mark D'Agosta @mdagosta

    TD, that worked perfectly!  I had a bit of trouble following the animation, so I had to watch it like 50 times, but once I got the sequence of events straight, it worked exactly as you describe. Thanks for your kind assistance.  Best regards, Mark

  6. #6
    Flamingolady Flamingolady @flamingolady🦩

    Have you tried to do simply path?  That 'might' remove lots of uneeded nodes and free up a little more space, helps Inkscape to not close or crash so much.  If Tyler's great hint doesn't get rid of all the unwanted nodes, you can make a larger clip path - and the clip path doesn't have to be a rectangle or circle, you can loosely draw a path that covers all of the unwanted nodes. 

  7. #7
    Mark D'Agosta Mark D'Agosta @mdagosta

    Thanks to all for suggestions.  One final question on the map I'm working on.  After following Tyler's suggestion, what I'm left with is basically a single path that covers all the "water" areas of the map.  I would now like to create separate layers for the various non-contiguous land masses.  When I try to Invert Selection, Inkscape does nothing; just ignores the command.  How can I create independent layers for the land masses?  (see attached screenshot)   Thanks.

    Inkscape Problem 2
  8. #8
    Flamingolady Flamingolady @flamingolady🦩

    Honestly I don't use the invert feature, doesn't save me time.  As usual, I'm sure there's more than one way to accomplish this task in Inkscape.  So until someone with a better/quicker idea comes along, I would suggest the good ole manual method, which is simply duplicating the map and using the node tool to highlight the unwanted areas and delete them, and move to a new layer, keep duplicating and repeating as desired.  Be sure to copy a full map onto a hidden layer first. 

  9. #9
    Mark D'Agosta Mark D'Agosta @mdagosta

    Thanks for your reply Flamingolady!  First of all, let me say that I'm a new Inkscape user (if you haven't already figured that out). And I don't really understand what you're suggesting.  As an example, I attempted to create a separate object of the land mass on the right side of the map. It seems to me that I should be able to select the northern-most node at the intersection of the page border and shift-select the southern-most node at the intersection of the page border and "join" them to complete that island.  But the "join selected nodes" button does absolutely nothing when I do that. No error message, no entry in the undo list... nothing.  So then I tried selecting the southern-most node at the intersection of the page border and then shift-selecting the node in the bottom right corner and tried to "break path at selected nodes".  Again, absolutely nothing happens. So, I don't see the benefit in creating a copy of the map, because then I'll just have *two* copies that behave the same way.  Can you please clarify?  

     

    Thanks so much,

    Mark

     

  10. #10
    Maren Hachmann Maren Hachmann @Moini

    To get the inverse, draw another rectangle that has the page's size, then duplicate your coast line, and do Path > Difference, with the coast line on top and the rectangle below selected. That will give you the land already. To separate the result into single objects, if needed, select it, and do Path > Break apart.

  11. #11
    Flamingolady Flamingolady @flamingolady🦩

    hi Mark.  Can you get the end result using Maren's suggestion?  That might be faster.  

    I find in using join nodes, that the paths need to overlap in order to be joined, else you can join selected end nodes by adding a new segment.  Sometimes Path>Union works better, joining nodes can be sticky.  I was thinking of  simply highlights then deleting the nodes of the land masses, leaving the water.

  12. #12
    Mark D'Agosta Mark D'Agosta @mdagosta

    Thanks Maren!  That worked just fine. 

     

    Just a clarification for anyone in the future who may look at this:

    when Maren says "... do Path > Difference, with the coast line on top and the rectangle below selected..." that means that you should open up the Object > Objects dialog, find the rectangle object and the path object of the duplicated coast line. Then, using the Objects dialog, make sure the coast line path object is *above* the rectangle object. Next, make sure that both objects are selected (can use CTRL-click to select multiple objects).  Finally, do the Path > Difference, followed by Path > Break apart, if desired.

    Thanks to everyone for their help!

  13. #13
    brynn brynn @brynn

    It sounds like you found a solution, but this is how I would approach your last question.

    Path menu > Break Apart.  Everything might turn black or a solid color.  If it does, then add a stroke and remove the fill. Then you will be able to see the different path segments.  Deselect everything.  And then you can select them and move to a new layer.

  14. #14
    Maren Hachmann Maren Hachmann @Moini

    @mdagosta Shift+Click will select multiple objects. You should be able to click through the holes in the coast line to select the rectangle, objects dialog is useful, but not strictly needed.

Inkscape Inkscape.org Inkscape Forum Beginners' Questions How to remove nodes outside the drawing page boundaries?