[Qgis-user] Importing SVG files for symbols

Ludwig Gamsjäger lucky at bergengasse.at
Wed Dec 10 01:29:35 PST 2014


Alex,
 enclosed below is a sample of my svg file, (QGIS would not find it as it
has no .xml but the standard svg extension when created).
Yes, I've tried to export one of the standard symbols and such would import
and I've attached the code as well, I have to admit that I'm not an xml
expert, thanks for every input in advance,

Ludwig


Symbol code not loading:

<?xml version="1.0"?>
<svg width="640" height="480" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
 <g>
  <title>Layer 1</title>
  <g transform="rotate(180, 80, 78)" id="svg_3">
   <g id="svg_1">
    <metadata id="svg_2"/>
    <path
d="m133.641602,36.926723l8.000961,8.000797l15.751205,31.59024l-31.590248,-15
.751202l-7.720001,-7.719677l-30.88192,31.997437l50.44368,48.733131c1.231842,
1.189911 1.308807,3.137115 0.174713,4.420471c-2.18367,2.471359
-4.521591,4.80928 -6.992798,6.992798c-1.283356,1.134094 -3.230553,1.057281
-4.420464,-0.174561l-48.567047,-50.271843l-48.519365,50.269768c-1.189758,1.2
32635 -3.137596,1.310074 -4.421438,0.175674c-2.47056,-2.183197
-4.808001,-4.520157 -6.990879,-6.990723c-1.134401,-1.283676
-1.057119,-3.231827
0.17568,-4.421585l50.436483,-48.680008l-33.406082,-34.580162c-6.023043,6.772
8 -11.116961,14.394402
-15.099041,22.665604l-17.408801,-15.146885c11.03968,-20.288639
27.7408,-36.975359 48.00928,-48.029279l15.139042,17.4064c-8.25312,3.974239
-15.853764,9.060001
-22.608482,15.071041l34.746559,33.5672l32.158081,-31.037281l-18.188316,-18.1
88641l15.839035,-15.83904l18.469276,18.4696l2.300156,-2.220318l7.392654,7.38
88l-2.221924,2.302242z" fill="black"/>
   </g>
  </g>
  <image xlink:href="images/logo.png" id="svg_4" height="48" width="48"
y="569" x="709"/>
 </g>
</svg>

Symbol code loading:

<!DOCTYPE qgis_style>
<qgis_style version="1">
  <symbols>
    <symbol alpha="1" type="marker" name="airport">
      <layer pass="0" class="SvgMarker" locked="0">
        <prop k="angle" v="0"/>
        <prop k="color" v="#000000"/>
        <prop k="horizontal_anchor_point" v="1"/>
        <prop k="name" v="gpsicons/plane.svg"/>
        <prop k="offset" v="0,0"/>
        <prop k="offset_map_unit_scale" v="0,0"/>
        <prop k="offset_unit" v="MM"/>
        <prop k="outline_color" v="#000000"/>
        <prop k="outline_width" v="1"/>
        <prop k="outline_width_map_unit_scale" v="0,0"/>
        <prop k="outline_width_unit" v="MM"/>
        <prop k="scale_method" v="area"/>
        <prop k="size" v="5"/>
        <prop k="size_map_unit_scale" v="0,0"/>
        <prop k="size_unit" v="MM"/>
        <prop k="vertical_anchor_point" v="1"/>
      </layer>
    </symbol>
  </symbols>
  <colorramps>
</qgis_style>

-----Ursprüngliche Nachricht-----
Von: Alex Mandel [mailto:tech_dev at wildintellect.com] 
Gesendet: Mittwoch, 10. Dezember 2014 08:52
An: Ludwig Gamsjäger; qgis-user
Betreff: Re: AW: [Qgis-user] Importing SVG files for symbols

Can you post an example svg file online for other people to test?
Have you tried importing some known working svg icons?

Thanks,
Alex

On 12/09/2014 10:37 PM, Ludwig Gamsjäger wrote:
> Alex,
> 
> thanks for your input, unfortunately this what I tried but it seems 
> not to work in 2.6. The location in options is now moved to 
> options/system, I inputted all my paths but it does not allow me to access
the symbols.
> Also trying to import in the Share function fails, it gives an error 
> like invalid svg tag in file or so.
> Maybe there is something I have overlooked in other tabs in options, 
> anyway, thanks,
> 
> Ludwig
> 
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: Alex Mandel [mailto:tech_dev at wildintellect.com]
> Gesendet: Dienstag, 09. Dezember 2014 18:37
> An: Ludwig Gamsjäger; qgis-user at lists.osgeo.org
> Betreff: Re: [Qgis-user] Importing SVG files for symbols
> 
> This page shows the process:
> http://learninggis.com/gis-resources/qgis-oilandgas-symbol
> 
> Thanks,
> Alex
> 
> On 12/09/2014 08:03 AM, Ludwig Gamsjäger wrote:
>>
>>
>> I would need some help to import svg symbols into QGIS Brighton. My 
>> main problem is that there is no documentation (or I can’t find it) 
>> how to proceed with this. Programs like Inkscape would read my files 
>> but
> not QGIS.
>> Maybe somebody is out there giving me hints or a reference 
>> documentation; thanks in advance,
>>
>>  
>>
>> Ludwig
>>
>>  
>>
>> Ludwig Gamsjäger
>>
>> Bergengasse 4/1/8
>>
>> A-1220 Vienna, Austria
>>
>> phone: +43 (0) 681 2066-3138
>>
>> email: lucky at bergengasse.at
>>
>>  
>>
>> This message is confidential and intended solely for the addressee. 
>> If you received this message in error, please immediately inform the 
>> sender and delete the message and any attachments. Thank you. To the 
>> extent permitted by law, I shall in no way be liable for any damages, 
>> whatever their nature, arising out of transmission failures, viruses, 
>> external influences, delays and the like.
>>
>>  
>>
>>
>>
>>
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/qgis-user
>>
> 




More information about the Qgis-user mailing list