[Qgis-developer] Re: SVG export

Richard Duivenvoorde rdmailings at duif.net
Sat Oct 10 04:09:31 EDT 2009


Hi Andreas,

I needed a svg map of the netherlands a while ago in which I wanted some 
points to be removed and rearranged.
I hacked some code of my html-imagemap-plugin into a new plugin. See 
http://www.duif.net/qgis/simplesvg/
(warning: code is rough!)

This preliminary plugin does (for single symbol point, line and polygon 
layers):
- group objects in layers and features (so in inkscape it's possible to 
change style/colof of whole layer or feature)
- point-features are little boxes in svg
- use (some of) style information from qgis
It's all very simple, but just enough to do the trick for me :-)


Found also the nice examples of carto, with more advanced svg tricks.
But using them I found out:
- world-projection (using real coordinates in svg) in inkscape isn't 
working (yet)
- css (needed to be able to define styles for objects) not yet 
implemented in inkscape yet.

In other words: I think it's possible to do this in a python plugin... 
(though off course fixing qt is a better (long term) idea).
If somebody is interested, please let me know.

Regards,

Richard Duivenvoorde

Later in the source-tree I found an (apparently abandoned?) cpp 
html-image-map plugin:
https://trac.osgeo.org/qgis/browser/trunk/external_plugins/imagemap_exporter
another possibility?






Andreas Neumann wrote:
> Hi all,
> 
> I also think that better import/export of SVG graphics would help 
> interoperability with other graphics software. Proper import/export 
> from/to Inkscape, Illustrator and Corel is important.
> 
> On the import side it would be good if Inkscape files would import 
> without problems into the QGIS map layout. On the export side it would 
> be good if the export would be properly clipped and would contain more 
> "structure": layers, ids for certain elements, less empty/unnecessary 
> <g/> elements, proper support for vector symbols (not rasterized), etc.
> 
> The problem is that most of our desired features aren't supported in the 
> qt SVG library. Furthermore, qtSVG is limited to SVG tiny - which causes 
> all the problems with the text elements (dx/dy not supported, etc.)
> 
> The best solution would be to patch qtSVG to do what we want - but we 
> have to be aware that it may take a while until our improvements would 
> make it into the standard qt distribution. By improving qtSVG also other 
> project that use qt for profit from our improvements.
> 
> Just recently returned from the SVG Open 2009 conference in California 
> where also other projects relying on qt (e.g. Fritzing) complained about 
> suboptimal SVG support: see 
> http://www.svgopen.org/2009/papers/33-SVG_in_Fritzing_a_Case_Study/ - so 
> maybe we could also team up with other projects relying on SVG support 
> in qt.
> 
> Looking forward to discuss these issues in Vienna.
> 
> Andreas
> 
> Anita Graser wrote:
>> Done: http://www.qgis.org/wiki/2._QGIS_Hackfest_in_Vienna_2009#Topics
>>
>>
>> -------- Original-Nachricht --------
>>  
>>> Datum: Fri, 09 Oct 2009 11:38:01 +0200
>>> Von: Paolo Cavallini <cavallini at faunalia.it>
>>> An: Anita Graser <anitagraser at gmx.at>
>>> CC: qgis-developer at lists.osgeo.org
>>> Betreff: Re: [Qgis-developer] Re: SVG export
>>>     
>>
>>  
>>> On Fri, 09 Oct 2009 08:55:28 +0200, "Anita Graser" <anitagraser at gmx.at>
>>> wrote:
>>>
>>>    
>>>> +1 Maybe we could address the topic at the Dev Meeting. Is anybody
>>>>       
>>> keeping
>>>    
>>>> track of the topics or should we create a list on the wiki page?
>>>>       
>>> +1 for the list; please add also the issues raised by Borys.
>>> Thanks.
>>> -- 
>>> http://faunalia.it/pc
>>>     
>>
>>   
> 
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer



More information about the Qgis-developer mailing list