[Qgis-user] SVG Fill

Andreas Neumann a.neumann at carto.net
Fri Aug 17 07:27:07 PDT 2012


 Hi Jonathan,

 There is always room for improvement, I agree. Suggestions for 
 improvements are sometimes better discussed in the qgis-dev list, since 
 many of the developers don't follow the qgis-user list.

 The QGIS user list is mainly for help with the existing feature set.

 You may want to suggest this functionality in the qgis-dev list and may 
 even want to raise in issue/feature request in the QGIS bug tracker. If 
 a feature is really important for you, the fastest way is to hire a 
 developer.

 But is also good to discuss new ideas upfront in the qgis-dev list. 
 Maybe some developer has a good idea how to implement things.

 Best regards,
 Andreas

 On Fri, 17 Aug 2012 14:38:32 +0100, Jonathan Moules wrote:
> Hi Andreas,
> The SVG-setting isn't a terrible solution (its fairly decent as I
> noted in my previous message), however it does mean that if someone
> is going to distribute QML-with-SVG files, they now also need to
> include an instruction manual telling them about SVG settings and the
> like.
> Also, remember that while this is simple for you and I, some users
> aren't as technically saavy as we are.
> Thanks for your help with this,
> Jonathan
>
> On 17 August 2012 14:07, Andreas Neumann  wrote:
>
>> Hi Jonathan,
>>
>> no - QGIS cannot embed SVG files in QML files. And it's not very
>> likely that this will get implemented - unless you pay someone to
>> implement it.
>>
>> But the solution with the SVG paths isn't bad/complicated anyway. It
>> is not a lot of work to copy a bunch of SVG files to a central place
>> and set it in the global options, is it?
>>
>> Just my opinion,
>> Andreas
>>
>> On Fri, 17 Aug 2012 12:57:18 +0100, Jonathan Moules wrote:
>>
>>> Hi Andreas,
>>>
>>> Unfortunately "relative" doesn't seem to work for QML files (you
>>> did
>>> say relative to .qgs files, but I don't actually have a project -
>>> I'm
>>> trying to create stand-alone QML files I can distribute both
>>> internally and to the community). My project is set to use
>>> relative
>>> paths, I then set up my styling and saved my style to a QML file.
>>>  
>>> I have this data structure:
>>>  
>>> /qml/this_style.qml
>>> /symbols/[lots of SVG symbols]
>>>  
>>> When I then started a new QGIS project, loaded the data then
>>> applied
>>> the this_style.qml, it didn't load the SVG symbols.
>>>  
>>> Looking in the saved QML file, it is saving the *absolute* path:
>>>  
>>>          
>>>
>>> Even if I then search-and-replace this with the relative path:
>>>          
>>>
>>> It still doesn't load the SVG files.
>>>  
>>> Even moving the directory structure to: /qml/symbols/ and then
>>> changing the relative term to "./symbols/" doesn't resolve it.
>>>
>>> Would this be considered a bug or desired behaviour?
>>>  
>>>  
>>> The only way I've found to get it working is to change the QML
>>> file to
>>> only point at the file name itself, then make that directory a
>>> "SVG path". This works and seems a fairly decent solution, though
>>> personally I'd still feel better if they were included in the QML
>>> file
>>> itself, it'd make distribution easier and importing easier.
>>>  
>>> Jonathan
>>>
>>>  
>>> On 17 August 2012 12:22, Andreas Neumann  wrote:
>>>
>>>> Hi Jonathan,
>>>>
>>>> SVG symbols are always just referenced.
>>>>
>>>> It is generally good advice to use relative paths in the project
>>>> settings. This influences paths to spatial data files (e.g.
>>>> shape
>>>> files, tiff files, spatialite), but also the SVG files.
>>>> Relative
>>>> means relative to the .qgs project file.
>>>>
>>>> I generally create a directory per GIS project and put the .qgis
>>>> in
>>>> the root of this directory and svg Files in a subdirectory.
>>>>
>>>> Alternatively, you can use the central storage of SVG files.
>>>> This
>>>> can be anywhere in your file system and you can define it in the
>>>> Global Options --> Rendering --> SVG Paths
>>>>
>>>> Hope this helps.
>>>>
>>>> Andreas
>>>>
>>>> On Fri, 17 Aug 2012 11:03:53 +0100, Jonathan Moules wrote:
>>>>
>>>>> Hi Andreas,
>>>>> I've used this to style up my data, and it was looking
>>>>> excellent
>>>>> good.
>>>>> However I then moved the SVG files that were being used as the
>>>>> SVG
>>>>> Markers for the point fill (they were in a temporary directory
>>>>> on
>>>>> my
>>>>> desktop). Unfortunately this seems to have resulted in all of
>>>>> the
>>>>> point filled stylings now not working!
>>>>>
>>>>> Is this desired behaviour?
>>>>> I expected the SVG styling information to be stored in the
>>>>> QML
>>>>> file,
>>>>> that way I could just share the QML files and they'd work.
>>>>> This
>>>>> way it
>>>>> basically renders QML files useless for sharing - everyone
>>>>> will
>>>>> want
>>>>> to put the SVG files somewhere different because everyone has
>>>>> a
>>>>> different directory structure.
>>>>>  
>>>>> If I look into the styling as loaded, the SVG maker is
>>>>> pointing
>>>>> at:
>>>>> "C:/PROGRA~1/Quantum GIS Lisboa/apps/qgis/svg"
>>>>> If I move the SVG files into there, they still aren't loaded
>>>>> if I
>>>>> reload the style.
>>>>> Any thoughts? Hows this supposed to work?
>>>>>  
>>>>> Jonathan
>>>>>
>>>>>  
>>>>> On 16 August 2012 16:13, Jonathan Moules  wrote:
>>>>>
>>>>>> Thats exactly what I want, works great, thanks!
>>>>>>
>>>>>> On 16 August 2012 15:25, Andreas Neumann wrote:
>>>>>>
>>>>>>>> supplied symbols, I'm not convinced QGIS could symbolise
>>>>>>>> them neatly
>>>>>>>> anyway without tweaking the SVG itself (i.e. there's no
>>>>>>>> way
>>>>>>>> to
>>>>>>>> specify
>>>>>>>> distance between symbols for instance).
>>>>>>>
>>>>>>> The patterns, by definition, don't have spacing between
>>>>>>> the
>>>>>>> tiles,
>>>>>>> because patterns should provide seamless tiling. However,
>>>>>>> you
>>>>>>> can
>>>>>>> specify the tile size.
>>>>>>>
>>>>>>> If you want spacing between symbols, you could use the
>>>>>>> point
>>>>>>> pattern fill editor where you can also use SVG point
>>>>>>> markers
>>>>>>> and
>>>>>>> provide spacing and displacement. This requires QGIS 1.8,
>>>>>>> I
>>>>>>> believe.
>>>>>>>
>>>>>>> Andreas
>>>>>>>
>>>>>>> --
>>>>>>> Andreas Neumann
>>>>>>> Böschacherstrasse 10A
>>>>>>> 8624 Grüt (Gossau ZH)
>>>>>>> Switzerland
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Qgis-user mailing list
>>>>>>> Qgis-user at lists.osgeo.org [1] [1] [1]
>>>>>>> http://lists.osgeo.org/mailman/listinfo/qgis-user [2] [2]
>>>>>>> [2]
>>>>>
>>>>>  This transmission is intended for the named addressee(s)
>>>>> only
>>>>> and may
>>>>> contain sensitive or protectively marked material up to
>>>>> RESTRICTED
>>>>> and
>>>>> should be handled accordingly. Unless you are the named
>>>>> addressee
>>>>> (or
>>>>> authorised to receive it for the addressee) you may not copy
>>>>> or
>>>>> use
>>>>> it, or disclose it to anyone else. If you have received this
>>>>> transmission in error please notify the sender immediately.
>>>>> All
>>>>> email
>>>>> traffic sent to or from us, including without limitation all
>>>>> GCSX
>>>>> traffic, may be subject to recording and/or monitoring in
>>>>> accordance
>>>>> with relevant legislation.
>>>>>
>>>>> Links:
>>>>> ------
>>>>> [1] mailto:Qgis-user at lists.osgeo.org [3] [3]
>>>>> [2] http://lists.osgeo.org/mailman/listinfo/qgis-user [4] [4]
>>>>> [3] mailto:a.neumann at carto.net [5] [5]
>>>>> [4] mailto:jonathanmoules at warwickshire.gov.uk [6] [6]
>>>>
>>>> --
>>>>
>>>> --
>>>> Andreas Neumann
>>>> Böschacherstrasse 10A
>>>> 8624 Grüt (Gossau ZH)
>>>> Switzerland
>>>
>>>  This transmission is intended for the named addressee(s) only
>>> and may
>>> contain sensitive or protectively marked material up to RESTRICTED
>>> and
>>> should be handled accordingly. Unless you are the named addressee
>>> (or
>>> authorised to receive it for the addressee) you may not copy or
>>> use
>>> it, or disclose it to anyone else. If you have received this
>>> transmission in error please notify the sender immediately. All
>>> email
>>> traffic sent to or from us, including without limitation all GCSX
>>> traffic, may be subject to recording and/or monitoring in
>>> accordance
>>> with relevant legislation.
>>>
>>> Links:
>>> ------
>>> [1] mailto:Qgis-user at lists.osgeo.org [7]
>>> [2] http://lists.osgeo.org/mailman/listinfo/qgis-user [8]
>>> [3] mailto:Qgis-user at lists.osgeo.org [9]
>>> [4] http://lists.osgeo.org/mailman/listinfo/qgis-user [10]
>>> [5] mailto:a.neumann at carto.net [11]
>>> [6] mailto:jonathanmoules at warwickshire.gov.uk [12]
>>> [7] mailto:a.neumann at carto.net [13]
>>
>> --
>> --
>> Andreas Neumann
>> Böschacherstrasse 10A
>> 8624 Grüt (Gossau ZH)
>> Switzerland
>
>  This transmission is intended for the named addressee(s) only and 
> may
> contain sensitive or protectively marked material up to RESTRICTED 
> and
> should be handled accordingly. Unless you are the named addressee (or
> authorised to receive it for the addressee) you may not copy or use
> it, or disclose it to anyone else. If you have received this
> transmission in error please notify the sender immediately. All email
> traffic sent to or from us, including without limitation all GCSX
> traffic, may be subject to recording and/or monitoring in accordance
> with relevant legislation.
>
>
> Links:
> ------
> [1] mailto:Qgis-user at lists.osgeo.org
> [2] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [3] mailto:Qgis-user at lists.osgeo.org
> [4] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [5] mailto:a.neumann at carto.net
> [6] mailto:jonathanmoules at warwickshire.gov.uk
> [7] mailto:Qgis-user at lists.osgeo.org
> [8] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [9] mailto:Qgis-user at lists.osgeo.org
> [10] http://lists.osgeo.org/mailman/listinfo/qgis-user
> [11] mailto:a.neumann at carto.net
> [12] mailto:jonathanmoules at warwickshire.gov.uk
> [13] mailto:a.neumann at carto.net
> [14] mailto:a.neumann at carto.net

-- 
 --
 Andreas Neumann
 Böschacherstrasse 10A
 8624 Grüt (Gossau ZH)
 Switzerland



More information about the Qgis-user mailing list