Hi y'all,
I am trying to cut out a part of an existing SVG, because I don't need the full SVG.
I am new to Inkscape, but have spent the whole day looking at tutorials and videos to get this done, but I can't see how it is possible without doing a large amount of work - work I don't mind doing, but would rather NOT do
The original image is a europe-map from Wikimedia, see the bottom for links. I want to cut out a rectangle of the map, that cuts through Turkey, Russia, Norway and Africa.
I have found out that I can use the to delete paths from certain objects, but when it is controlled by my unsteady hand, it will not be a pretty straight line, which I want
I Also found a tutorial, specifying that it is possible to use Object > Clip > Set. Unfortunately the actual data will remain and the image would therefore not be optimal for the web in this form.
Are there any way to define a path or maybe some guidelines, on which all should be cropped to, where the excess data is removed?
I am using Inkscape version 0.48.4 r9939 on Windows 7.
Related links:
image: http://commons.wikimedia.org/wiki/File: ... daries.svg
The tutorial, that I found: http://inkscapetutorials.wordpress.com/ ... -inkscape/
Related Forum thread: viewtopic.php?f=5&t=6813
Yours sincerely
Steen Nielsen
Extracting a rectangle area as SVG
Re: Extracting a rectangle area as SVG
Welcome aboard!
It's more of manual workig, node editing.
If you place a rectangle on the right area, you can use the snapping feature too for making straight edges.
http://www.inkscapeforum.com/viewtopic.php?f=5&t=15626
Good luck!
It's more of manual workig, node editing.
If you place a rectangle on the right area, you can use the snapping feature too for making straight edges.
http://www.inkscapeforum.com/viewtopic.php?f=5&t=15626
Good luck!
Re: Extracting a rectangle area as SVG
Thank you for the reply.
Hmm, dammit.. Manuel labour
Maybe it is worth as a feature-request, if it isn't already on the list.
it shouldn't be a big thing, for the right people, to make it possible in Inkscape.
It should just be an option called "Crop", which does a few things, such as:
* Find intersections on paths and set new nodes on this intersection (should be possible to do fairly easy mathematically).
* Remove all nodes/paths outside selection.
There might be more to do, but these things would be a good start.
Hmm, dammit.. Manuel labour
Maybe it is worth as a feature-request, if it isn't already on the list.
it shouldn't be a big thing, for the right people, to make it possible in Inkscape.
It should just be an option called "Crop", which does a few things, such as:
* Find intersections on paths and set new nodes on this intersection (should be possible to do fairly easy mathematically).
* Remove all nodes/paths outside selection.
There might be more to do, but these things would be a good start.
Re: Extracting a rectangle area as SVG
The intersect option (Ctrl+*) should do that.
Only drawback is that the path will get recalculated, adding a small error to each coordinates of the nodes.
Only drawback is that the path will get recalculated, adding a small error to each coordinates of the nodes.
Re: Extracting a rectangle area as SVG
Hi.
There are always more than one way to "skin a cat' - even in Inkscape.
The image you are starting with is literally a "patchwork" with objects on top of each other - in places several layers deep - making it difficult to do the extraction easily in Inkscape.
One method to get what you want is to use the python programming language. Python has a lot of available libraries to do "anything".
For your map you would want the matplotlib and basemap libraries.
One way to get most of the needed libraries for "scientific" computing is to install pythonxy from here; http://code.google.com/p/pythonxy/
Python is free of charge - opensource.
With just a few lines of code:
You can get this:
(Click image for larger version.)
The code was "lifted" from this page; http://peak5390.wordpress.com/2012/12/08/matplotlib-basemap-tutorial-making-a-simple-map/
and just some small adjustments of the coordinates and color codes were made to make "your" map.
Chime back if you want the SVG file to "play" with. It's too big to upload to the forum.
The "detail level" can be adjusted in the code to make the file smaller.
Have Fun.
RGDS
Ragnar
There are always more than one way to "skin a cat' - even in Inkscape.
The image you are starting with is literally a "patchwork" with objects on top of each other - in places several layers deep - making it difficult to do the extraction easily in Inkscape.
One method to get what you want is to use the python programming language. Python has a lot of available libraries to do "anything".
For your map you would want the matplotlib and basemap libraries.
One way to get most of the needed libraries for "scientific" computing is to install pythonxy from here; http://code.google.com/p/pythonxy/
Python is free of charge - opensource.
With just a few lines of code:
Code: Select all
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
import numpy as np
map = Basemap(projection='merc', lat_0=31.6, lon_0=1,
resolution = 'i', area_thresh = 0.1,
llcrnrlon=1.0, llcrnrlat=30.0,
urcrnrlon=40.0, urcrnrlat=72.0)
map.drawcoastlines(linewidth=0.5)
map.drawcountries(linewidth=0.5)
map.fillcontinents(color='#FFFFD0',lake_color='#9FC7F4')
map.drawmapboundary(fill_color=('#9FC7F4'))
plt.savefig('SwineDK_Map1.svg')
plt.show()
You can get this:
(Click image for larger version.)
The code was "lifted" from this page; http://peak5390.wordpress.com/2012/12/08/matplotlib-basemap-tutorial-making-a-simple-map/
and just some small adjustments of the coordinates and color codes were made to make "your" map.
Chime back if you want the SVG file to "play" with. It's too big to upload to the forum.
The "detail level" can be adjusted in the code to make the file smaller.
Have Fun.
RGDS
Ragnar
Good Luck!
( ͡° ͜ʖ ͡°)
RGDS
Ragnar
( ͡° ͜ʖ ͡°)
RGDS
Ragnar