Re: [Qgis-developer] custom charts?

2016-06-28 Thread Marco Bernasocchi
Nice workflow!

On 29 June 2016 02:31:27 GMT+12:00, Raymond Nijssen  
wrote:
>Here is an example of a map with code generated svg images as symbols.
>The quick and dirty script does:
>
>- aggregate all features from input point layer with same geometry
>- calculate min/max times and values for whole set
>- create svg files for every feature with filename based on id
>- create a layer in qgis
>
>Manually i added the data defined filename based on the id:
>
>'/tmp/img_measure_' || "imgid" || '.svg'
>
>Et voila!
>
>http://terglobo.nl/downloads/voorbeeld_kaart_01.png
>
>Thank you all for your suggestions!
>
>Raymond
>
>
>
>On 26-06-16 11:58, Raymond Nijssen wrote:
>> There is this library to make it easier:
>> 
>> https://pypi.python.org/pypi/svgwrite/
>> 
>> And since it is python, you can use the standard code editor in QGIS
>(or
>> an external one if you prefer).
>> 
>> Raymond
>> 
>> On 25-06-16 21:33, Lauri Kajan wrote:
>>> This would be great also for nautical charts to render light sectors
>>> from S57 data.
>>>
>>> Could existing code editor be used to construct the svg with some
>python
>>> svg library?
>>>
>>>
>>> -Lauri
>>>
>>>
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>> 
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> 
>
>-- 
>Terglobo
>Fahrenheitstraat 1
>5223 BJ 's-Hertogenbosch
>06 25 31 49 83
>___
>Qgis-developer mailing list
>Qgis-developer@lists.osgeo.org
>List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
Marco Bernasocchi (mobile).
OPENGIS.ch - berna.io - 27summits.ch___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-28 Thread Raymond Nijssen
Here is an example of a map with code generated svg images as symbols.
The quick and dirty script does:

- aggregate all features from input point layer with same geometry
- calculate min/max times and values for whole set
- create svg files for every feature with filename based on id
- create a layer in qgis

Manually i added the data defined filename based on the id:

'/tmp/img_measure_' || "imgid" || '.svg'

Et voila!

http://terglobo.nl/downloads/voorbeeld_kaart_01.png

Thank you all for your suggestions!

Raymond



On 26-06-16 11:58, Raymond Nijssen wrote:
> There is this library to make it easier:
> 
> https://pypi.python.org/pypi/svgwrite/
> 
> And since it is python, you can use the standard code editor in QGIS (or
> an external one if you prefer).
> 
> Raymond
> 
> On 25-06-16 21:33, Lauri Kajan wrote:
>> This would be great also for nautical charts to render light sectors
>> from S57 data.
>>
>> Could existing code editor be used to construct the svg with some python
>> svg library?
>>
>>
>> -Lauri
>>
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Terglobo
Fahrenheitstraat 1
5223 BJ 's-Hertogenbosch
06 25 31 49 83
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-26 Thread Raymond Nijssen
There is this library to make it easier:

https://pypi.python.org/pypi/svgwrite/

And since it is python, you can use the standard code editor in QGIS (or
an external one if you prefer).

Raymond

On 25-06-16 21:33, Lauri Kajan wrote:
> This would be great also for nautical charts to render light sectors
> from S57 data.
> 
> Could existing code editor be used to construct the svg with some python
> svg library?
> 
> 
> -Lauri
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-25 Thread Lauri Kajan
This would be great also for nautical charts to render light sectors from
S57 data.

Could existing code editor be used to construct the svg with some python
svg library?


-Lauri
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread kimaidou
Hi all,

Great idea indeed.
Here is another example of "dynamic" SVG, used here to render PNG as
symbols in QGIS. Not with expressions but with a Python method.
https://gist.github.com/mdouchin/d66191ccfadd74cff3f0

It is derived of the work of Nathan Woodrow:
http://nathanw.net/2016/02/04/live-svgs/

This could be adapted to create a SVG from a template via Python tools like
template:
https://docs.python.org/2/library/string.html#template-strings
or more advanced template engines


​Cheers,
Michaël​
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Neumann, Andreas
That's a cool idea. It would be similar to the HTML element in print
composer, where one can also mix static and dynamic HTML code - with
Expressions. It would be very flexible. 

Maybe this could even be further extended to also allow Javascript
inside the SVG code (like a web-browser does). The HTML element in print
composer also has support for JSON onload-data based on relations. That
could also be useful for such custom SVG generators created with
Javascript. 

See
https://github.com/qgis/QGIS/commit/794ab065dc7ada524ee9b284f90ea70c8e4c75c8
 

Just brainstorming a bit ;-) 

Andreas 

On 2016-06-24 14:59, Hugo Mercier wrote:

> Actually, we already have a "template" concept in SVG, if you look at
> the SVG shipped with QGIS, they have things like fill="param(fill)"
> allowing to have the filling color as a user parameter.
> 
> That could be easily extended to also support feature's attributes and
> expressions.
> 
> On 24/06/2016 14:45, Raymond Nijssen wrote: Hugo,
> 
> That would be way cooler!
> 
> For now, I just write generated svg files to a temp directory and add
> links to them to every feature.
> 
> Strings might get long though. Here is for example the code from my
> dummy image (1.4kb):
> 
> 
> 
> 
>  xmlns:dc="http://purl.org/dc/elements/1.1/";
> xmlns:cc="http://creativecommons.org/ns#";
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
> xmlns:svg="http://www.w3.org/2000/svg";
> xmlns="http://www.w3.org/2000/svg";
> version="1.1"
> width="32"
> height="32"
> id="svg2985">
>  id="defs2987" />
>  id="metadata2990">
> 
>  rdf:about="">
> image/svg+xml
>  rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
> 
> 
> 
> 
>  id="layer1">
>  width="32"
> height="32"
> ry="5.1795878"
> x="0"
> y="0"
> id="rect2993"
> style="fill:#efefef;fill-opacity:1;stroke:none" />
>  d="m 3.2204932,9.8354288 c 0,0 2.1492989,4.3642312
> 5.9021879,4.1948682 2.6857939,-0.121208 2.4849709,-3.285023
> 5.3970119,-3.017097 3.079402,0.283325 2.518907,6.965981
> 6.783374,7.088215 4.047473,0.116014 6.797316,8.50238 6.797316,8.50238"
> id="path3763"
> 
> style="fill:none;stroke:#a32800;stroke-width:1.6002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
> />
> 
> 
> 
> On 24-06-16 14:34, Hugo Mercier wrote: It would be also cool to be able to 
> directly use a string as image
> content for a marker (rather than just for the filename).
> That should be quite easy to do.
> 
> On 24/06/2016 14:28, Nathan Woodrow wrote: Raymond,
> 
> Code generated SVGs is a pretty cool idea.  Would be super keen to see
> that once you have something!
> 
> On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas  > wrote:
> 
> Pretty cool - so we can deliver script-generated SVG code instead of
> a filename? Nice!
> 
> Care to do a blog post with some example? This sounds quite exciting
> to me.
> 
> Andreas
> 
> On 2016-06-24 14:12, Raymond Nijssen wrote:
> 
> Hi Hugo,
> 
> It works! Thanks a lot!!
> 
> This is exactly what i was looking for, but somehow could not find.
> 
> Here is a little example with some fake svg's:
> 
> http://terglobo.nl/downloads/example.png
> 
> Now I will script generating svg based on real data.
> 
> Regards,
> Raymond
> 
> On 23-06-16 09:02, Hugo Mercier wrote: On 22/06/2016 19:06, Richard 
> Duivenvoorde wrote: On 22-06-16 14:39, Hugo Mercier wrote: Hi 
> Raymond, - Add a text field to my feature layer containig svg, and
> somehow make
> qgis display that on my map; 
> This should work, no ?

Are you sure? This would mean that the value(!) of an attribute
would
contain the actual svg (code, not filename).
Any example on how to use that with styling then? 
Hmmm exact, I don't think you can include the content (I tried to
include a data url but it does not work).

> - Add a text field to my feature layer containig a path to a
> png (or
> svg), and somehow make qgis display that on my map. 
> An SVG marker with the file name defined as an expression ?

Same here, while we managed to get for example colors dynamic,
we could
not find a way (yet) to set the marker-svg once filename is
retrieved
from an attribute...

Happy to get an example or pointers :-) 
with an SVG-marker the filename can be "data-defined", so you can
for
instance use an expression like '/xxx/mymarker_' || id || '.svg'

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org

List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org

List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mai

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Hugo Mercier
Actually, we already have a "template" concept in SVG, if you look at
the SVG shipped with QGIS, they have things like fill="param(fill)"
allowing to have the filling color as a user parameter.

That could be easily extended to also support feature's attributes and
expressions.

On 24/06/2016 14:45, Raymond Nijssen wrote:
> Hugo,
> 
> That would be way cooler!
> 
> For now, I just write generated svg files to a temp directory and add
> links to them to every feature.
> 
> Strings might get long though. Here is for example the code from my
> dummy image (1.4kb):
> 
> 
> 
> 
> xmlns:dc="http://purl.org/dc/elements/1.1/";
>xmlns:cc="http://creativecommons.org/ns#";
>xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
>xmlns:svg="http://www.w3.org/2000/svg";
>xmlns="http://www.w3.org/2000/svg";
>version="1.1"
>width="32"
>height="32"
>id="svg2985">
> id="defs2987" />
> id="metadata2990">
> 
> rdf:about="">
> image/svg+xml
> rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
> 
>   
> 
>   
> id="layer1">
> width="32"
>height="32"
>ry="5.1795878"
>x="0"
>y="0"
>id="rect2993"
>style="fill:#efefef;fill-opacity:1;stroke:none" />
> d="m 3.2204932,9.8354288 c 0,0 2.1492989,4.3642312
> 5.9021879,4.1948682 2.6857939,-0.121208 2.4849709,-3.285023
> 5.3970119,-3.017097 3.079402,0.283325 2.518907,6.965981
> 6.783374,7.088215 4.047473,0.116014 6.797316,8.50238 6.797316,8.50238"
>id="path3763"
> 
> style="fill:none;stroke:#a32800;stroke-width:1.6002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
> />
>   
> 
> 
> 
> 
> 
> 
> 
> On 24-06-16 14:34, Hugo Mercier wrote:
>> It would be also cool to be able to directly use a string as image
>> content for a marker (rather than just for the filename).
>> That should be quite easy to do.
>>
>> On 24/06/2016 14:28, Nathan Woodrow wrote:
>>> Raymond,
>>>
>>> Code generated SVGs is a pretty cool idea.  Would be super keen to see
>>> that once you have something!
>>>
>>> On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas >> > wrote:
>>>
>>> Pretty cool - so we can deliver script-generated SVG code instead of
>>> a filename? Nice!
>>>
>>> Care to do a blog post with some example? This sounds quite exciting
>>> to me.
>>>
>>> Andreas
>>>
>>> On 2016-06-24 14:12, Raymond Nijssen wrote:
>>>
 Hi Hugo,

 It works! Thanks a lot!!

 This is exactly what i was looking for, but somehow could not find.

 Here is a little example with some fake svg's:

 http://terglobo.nl/downloads/example.png

 Now I will script generating svg based on real data.

 Regards,
 Raymond


 On 23-06-16 09:02, Hugo Mercier wrote:
> On 22/06/2016 19:06, Richard Duivenvoorde wrote:
>> On 22-06-16 14:39, Hugo Mercier wrote:
>>> Hi Raymond,
 - Add a text field to my feature layer containig svg, and
 somehow make
 qgis display that on my map;
>>>
>>> This should work, no ?
>>
>> Are you sure? This would mean that the value(!) of an attribute
>> would
>> contain the actual svg (code, not filename).
>> Any example on how to use that with styling then?
>
> Hmmm exact, I don't think you can include the content (I tried to
> include a data url but it does not work).
>
>>
 - Add a text field to my feature layer containig a path to a
 png (or
 svg), and somehow make qgis display that on my map.
>>>
>>> An SVG marker with the file name defined as an expression ?
>>
>> Same here, while we managed to get for example colors dynamic,
>> we could
>> not find a way (yet) to set the marker-svg once filename is
>> retrieved
>> from an attribute...
>>
>> Happy to get an example or pointers :-)
>
> with an SVG-marker the filename can be "data-defined", so you can for
> instance use an expression like '/xxx/mymarker_' || id || '.svg'
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>

 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org 
 List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
 Unsubscribe: http://

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Neumann, Andreas
Hi Raymond, 

Well - 90% is some default Inkscape/RDF junk. You can trim this down to
four lines - header, the path element and the closing SVG element. 

Also, some of the styling parameters are unncessary, as SVG has default
values - not necessary, to write fill-opacity:1;, because this already
the default. 

BTW: Inkscape can save to "Optimized SVG", which should also be much
smaller. 

Andreas 

On 2016-06-24 14:45, Raymond Nijssen wrote:

> Hugo,
> 
> That would be way cooler!
> 
> For now, I just write generated svg files to a temp directory and add
> links to them to every feature.
> 
> Strings might get long though. Here is for example the code from my
> dummy image (1.4kb):
> 
> 
> 
> 
>  xmlns:dc="http://purl.org/dc/elements/1.1/";
> xmlns:cc="http://creativecommons.org/ns#";
> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
> xmlns:svg="http://www.w3.org/2000/svg";
> xmlns="http://www.w3.org/2000/svg";
> version="1.1"
> width="32"
> height="32"
> id="svg2985">
>  id="defs2987" />
>  id="metadata2990">
> 
>  rdf:about="">
> image/svg+xml
>  rdf:resource="http://purl.org/dc/dcmitype/StillImage"; />
> 
> 
> 
> 
>  id="layer1">
>  width="32"
> height="32"
> ry="5.1795878"
> x="0"
> y="0"
> id="rect2993"
> style="fill:#efefef;fill-opacity:1;stroke:none" />
>  d="m 3.2204932,9.8354288 c 0,0 2.1492989,4.3642312
> 5.9021879,4.1948682 2.6857939,-0.121208 2.4849709,-3.285023
> 5.3970119,-3.017097 3.079402,0.283325 2.518907,6.965981
> 6.783374,7.088215 4.047473,0.116014 6.797316,8.50238 6.797316,8.50238"
> id="path3763"
> 
> style="fill:none;stroke:#a32800;stroke-width:1.6002;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
> />
> 
> 
> 
> On 24-06-16 14:34, Hugo Mercier wrote: It would be also cool to be able to 
> directly use a string as image
> content for a marker (rather than just for the filename).
> That should be quite easy to do.
> 
> On 24/06/2016 14:28, Nathan Woodrow wrote: Raymond,
> 
> Code generated SVGs is a pretty cool idea.  Would be super keen to see
> that once you have something!
> 
> On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas  > wrote:
> 
> Pretty cool - so we can deliver script-generated SVG code instead of
> a filename? Nice!
> 
> Care to do a blog post with some example? This sounds quite exciting
> to me.
> 
> Andreas
> 
> On 2016-06-24 14:12, Raymond Nijssen wrote:
> 
> Hi Hugo,
> 
> It works! Thanks a lot!!
> 
> This is exactly what i was looking for, but somehow could not find.
> 
> Here is a little example with some fake svg's:
> 
> http://terglobo.nl/downloads/example.png
> 
> Now I will script generating svg based on real data.
> 
> Regards,
> Raymond
> 
> On 23-06-16 09:02, Hugo Mercier wrote: On 22/06/2016 19:06, Richard 
> Duivenvoorde wrote: On 22-06-16 14:39, Hugo Mercier wrote: Hi 
> Raymond, - Add a text field to my feature layer containig svg, and
> somehow make
> qgis display that on my map; 
> This should work, no ?

Are you sure? This would mean that the value(!) of an attribute
would
contain the actual svg (code, not filename).
Any example on how to use that with styling then? 
Hmmm exact, I don't think you can include the content (I tried to
include a data url but it does not work).

> - Add a text field to my feature layer containig a path to a
> png (or
> svg), and somehow make qgis display that on my map. 
> An SVG marker with the file name defined as an expression ?

Same here, while we managed to get for example colors dynamic,
we could
not find a way (yet) to set the marker-svg once filename is
retrieved
from an attribute...

Happy to get an example or pointers :-) 
with an SVG-marker the filename can be "data-defined", so you can
for
instance use an expression like '/xxx/mymarker_' || id || '.svg'

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org

List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org

List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org

List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://li

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Raymond Nijssen
Hugo,

That would be way cooler!

For now, I just write generated svg files to a temp directory and add
links to them to every feature.

Strings might get long though. Here is for example the code from my
dummy image (1.4kb):




http://purl.org/dc/elements/1.1/";
   xmlns:cc="http://creativecommons.org/ns#";
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#";
   xmlns:svg="http://www.w3.org/2000/svg";
   xmlns="http://www.w3.org/2000/svg";
   version="1.1"
   width="32"
   height="32"
   id="svg2985">
  
  

  
image/svg+xml
http://purl.org/dc/dcmitype/StillImage"; />

  

  
  


  







On 24-06-16 14:34, Hugo Mercier wrote:
> It would be also cool to be able to directly use a string as image
> content for a marker (rather than just for the filename).
> That should be quite easy to do.
> 
> On 24/06/2016 14:28, Nathan Woodrow wrote:
>> Raymond,
>>
>> Code generated SVGs is a pretty cool idea.  Would be super keen to see
>> that once you have something!
>>
>> On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas > > wrote:
>>
>> Pretty cool - so we can deliver script-generated SVG code instead of
>> a filename? Nice!
>>
>> Care to do a blog post with some example? This sounds quite exciting
>> to me.
>>
>> Andreas
>>
>> On 2016-06-24 14:12, Raymond Nijssen wrote:
>>
>>> Hi Hugo,
>>>
>>> It works! Thanks a lot!!
>>>
>>> This is exactly what i was looking for, but somehow could not find.
>>>
>>> Here is a little example with some fake svg's:
>>>
>>> http://terglobo.nl/downloads/example.png
>>>
>>> Now I will script generating svg based on real data.
>>>
>>> Regards,
>>> Raymond
>>>
>>>
>>> On 23-06-16 09:02, Hugo Mercier wrote:
 On 22/06/2016 19:06, Richard Duivenvoorde wrote:
> On 22-06-16 14:39, Hugo Mercier wrote:
>> Hi Raymond,
>>> - Add a text field to my feature layer containig svg, and
>>> somehow make
>>> qgis display that on my map;
>>
>> This should work, no ?
>
> Are you sure? This would mean that the value(!) of an attribute
> would
> contain the actual svg (code, not filename).
> Any example on how to use that with styling then?

 Hmmm exact, I don't think you can include the content (I tried to
 include a data url but it does not work).

>
>>> - Add a text field to my feature layer containig a path to a
>>> png (or
>>> svg), and somehow make qgis display that on my map.
>>
>> An SVG marker with the file name defined as an expression ?
>
> Same here, while we managed to get for example colors dynamic,
> we could
> not find a way (yet) to set the marker-svg once filename is
> retrieved
> from an attribute...
>
> Happy to get an example or pointers :-)

 with an SVG-marker the filename can be "data-defined", so you can for
 instance use an expression like '/xxx/mymarker_' || id || '.svg'


 ___
 Qgis-developer mailing list
 Qgis-developer@lists.osgeo.org
 
 List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
 Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

>>>
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org 
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>  
>>
>>  
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org 
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
>>
>>
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Terglobo
Fahrenheitstraat 1
5223 BJ 's-Hertogenbosch
06 25 31 49 83
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Hugo Mercier
It would be also cool to be able to directly use a string as image
content for a marker (rather than just for the filename).
That should be quite easy to do.

On 24/06/2016 14:28, Nathan Woodrow wrote:
> Raymond,
> 
> Code generated SVGs is a pretty cool idea.  Would be super keen to see
> that once you have something!
> 
> On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas  > wrote:
> 
> Pretty cool - so we can deliver script-generated SVG code instead of
> a filename? Nice!
> 
> Care to do a blog post with some example? This sounds quite exciting
> to me.
> 
> Andreas
> 
> On 2016-06-24 14:12, Raymond Nijssen wrote:
> 
>> Hi Hugo,
>>
>> It works! Thanks a lot!!
>>
>> This is exactly what i was looking for, but somehow could not find.
>>
>> Here is a little example with some fake svg's:
>>
>> http://terglobo.nl/downloads/example.png
>>
>> Now I will script generating svg based on real data.
>>
>> Regards,
>> Raymond
>>
>>
>> On 23-06-16 09:02, Hugo Mercier wrote:
>>> On 22/06/2016 19:06, Richard Duivenvoorde wrote:
 On 22-06-16 14:39, Hugo Mercier wrote:
> Hi Raymond,
>> - Add a text field to my feature layer containig svg, and
>> somehow make
>> qgis display that on my map;
>
> This should work, no ?

 Are you sure? This would mean that the value(!) of an attribute
 would
 contain the actual svg (code, not filename).
 Any example on how to use that with styling then?
>>>
>>> Hmmm exact, I don't think you can include the content (I tried to
>>> include a data url but it does not work).
>>>

>> - Add a text field to my feature layer containig a path to a
>> png (or
>> svg), and somehow make qgis display that on my map.
>
> An SVG marker with the file name defined as an expression ?

 Same here, while we managed to get for example colors dynamic,
 we could
 not find a way (yet) to set the marker-svg once filename is
 retrieved
 from an attribute...

 Happy to get an example or pointers :-)
>>>
>>> with an SVG-marker the filename can be "data-defined", so you can for
>>> instance use an expression like '/xxx/mymarker_' || id || '.svg'
>>>
>>>
>>> ___
>>> Qgis-developer mailing list
>>> Qgis-developer@lists.osgeo.org
>>> 
>>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>>>
>>
>> ___
>> Qgis-developer mailing list
>> Qgis-developer@lists.osgeo.org 
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
>  
> 
>  
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org 
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 
> 
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Nathan Woodrow
Raymond,

Code generated SVGs is a pretty cool idea.  Would be super keen to see that
once you have something!

On Fri, Jun 24, 2016 at 10:25 PM, Neumann, Andreas 
wrote:

> Pretty cool - so we can deliver script-generated SVG code instead of a
> filename? Nice!
>
> Care to do a blog post with some example? This sounds quite exciting to me.
>
> Andreas
>
> On 2016-06-24 14:12, Raymond Nijssen wrote:
>
> Hi Hugo,
>
> It works! Thanks a lot!!
>
> This is exactly what i was looking for, but somehow could not find.
>
> Here is a little example with some fake svg's:
>
> http://terglobo.nl/downloads/example.png
>
> Now I will script generating svg based on real data.
>
> Regards,
> Raymond
>
>
> On 23-06-16 09:02, Hugo Mercier wrote:
>
> On 22/06/2016 19:06, Richard Duivenvoorde wrote:
>
> On 22-06-16 14:39, Hugo Mercier wrote:
>
> Hi Raymond,
>
> - Add a text field to my feature layer containig svg, and somehow make
> qgis display that on my map;
>
>
> This should work, no ?
>
>
> Are you sure? This would mean that the value(!) of an attribute would
> contain the actual svg (code, not filename).
> Any example on how to use that with styling then?
>
>
> Hmmm exact, I don't think you can include the content (I tried to
> include a data url but it does not work).
>
>
> - Add a text field to my feature layer containig a path to a png (or
> svg), and somehow make qgis display that on my map.
>
>
> An SVG marker with the file name defined as an expression ?
>
>
> Same here, while we managed to get for example colors dynamic, we could
> not find a way (yet) to set the marker-svg once filename is retrieved
> from an attribute...
>
> Happy to get an example or pointers :-)
>
>
> with an SVG-marker the filename can be "data-defined", so you can for
> instance use an expression like '/xxx/mymarker_' || id || '.svg'
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>
>
>
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Neumann, Andreas
Pretty cool - so we can deliver script-generated SVG code instead of a
filename? Nice! 

Care to do a blog post with some example? This sounds quite exciting to
me. 

Andreas 

On 2016-06-24 14:12, Raymond Nijssen wrote:

> Hi Hugo,
> 
> It works! Thanks a lot!!
> 
> This is exactly what i was looking for, but somehow could not find.
> 
> Here is a little example with some fake svg's:
> 
> http://terglobo.nl/downloads/example.png
> 
> Now I will script generating svg based on real data.
> 
> Regards,
> Raymond
> 
> On 23-06-16 09:02, Hugo Mercier wrote: On 22/06/2016 19:06, Richard 
> Duivenvoorde wrote: On 22-06-16 14:39, Hugo Mercier wrote: Hi Raymond, - Add 
> a text field to my feature layer containig svg, and somehow make
> qgis display that on my map; 
> This should work, no ?

Are you sure? This would mean that the value(!) of an attribute would
contain the actual svg (code, not filename).
Any example on how to use that with styling then? 
Hmmm exact, I don't think you can include the content (I tried to
include a data url but it does not work).

> - Add a text field to my feature layer containig a path to a png (or
> svg), and somehow make qgis display that on my map. 
> An SVG marker with the file name defined as an expression ?

Same here, while we managed to get for example colors dynamic, we could
not find a way (yet) to set the marker-svg once filename is retrieved
from an attribute...

Happy to get an example or pointers :-) 
with an SVG-marker the filename can be "data-defined", so you can for
instance use an expression like '/xxx/mymarker_' || id || '.svg'

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer 

  ___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-24 Thread Raymond Nijssen
Hi Hugo,

It works! Thanks a lot!!

This is exactly what i was looking for, but somehow could not find.

Here is a little example with some fake svg's:

http://terglobo.nl/downloads/example.png

Now I will script generating svg based on real data.

Regards,
Raymond


On 23-06-16 09:02, Hugo Mercier wrote:
> On 22/06/2016 19:06, Richard Duivenvoorde wrote:
>> On 22-06-16 14:39, Hugo Mercier wrote:
>>> Hi Raymond,
 - Add a text field to my feature layer containig svg, and somehow make
 qgis display that on my map;
>>>
>>> This should work, no ?
>>
>> Are you sure? This would mean that the value(!) of an attribute would
>> contain the actual svg (code, not filename).
>> Any example on how to use that with styling then?
> 
> Hmmm exact, I don't think you can include the content (I tried to
> include a data url but it does not work).
> 
>>
 - Add a text field to my feature layer containig a path to a png (or
 svg), and somehow make qgis display that on my map.
>>>
>>> An SVG marker with the file name defined as an expression ?
>>
>> Same here, while we managed to get for example colors dynamic, we could
>> not find a way (yet) to set the marker-svg once filename is retrieved
>> from an attribute...
>>
>> Happy to get an example or pointers :-)
> 
> with an SVG-marker the filename can be "data-defined", so you can for
> instance use an expression like '/xxx/mymarker_' || id || '.svg'
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-23 Thread Neumann, Andreas
Hi Raymond, 

Do you have an example how such a visualization could look like? Kind of
a mockup? 

In QGIS master, Matthieu Pellerin added additional simple markers now
(e.g. half/third/quarter circles, squares, triangles, etc.), e.g. to
create wingcharts. The combination of custom anchor points, offsets,
rotation and scaling on the symbol level allows for many interesting
visualizations - such as the "wing chart" showing commuters at train
stations by type (work, education, leisure, etc) at
http://www.carto.net/neumann/temp/commuters_by_type.png. With these
basic symbols you can also do other chart types as combinations of
scaled, rotated and offseted simple symbols to visualize sensor values. 

More such simple markers could be added, should there be the need for. 

Hope this helps, 

Greetings, 

Andreas 

On 2016-06-22 14:19, Raymond Nijssen wrote:

> Dear developers,
> 
> Can I somehow show custom images for each point feature on a map,
> similar to the layer diagrams?
> 
> Having locations with a few sensor values, I'd like to generate a custom
> image for every feature (for example svg or png) and have it displayed
> on my feature.
> 
> I've come up with some ideas:
> 
> - Create many custom svg files in a directory linked to qgis, and
> afterwards create a long rule-based style for every unique feature;
> 
> - Add a text field to my feature layer containig svg, and somehow make
> qgis display that on my map;
> 
> - Add a text field to my feature layer containig a path to a png (or
> svg), and somehow make qgis display that on my map.
> 
> None of those options seems to be possible. Does anybody know a solution?
> 
> Thanks!
> 
> Raymond
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

  ___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-23 Thread Raymond Nijssen
Thanks Hugo, I will try to get this to work.

On 23-06-16 09:02, Hugo Mercier wrote:
> On 22/06/2016 19:06, Richard Duivenvoorde wrote:
>> On 22-06-16 14:39, Hugo Mercier wrote:
>>> Hi Raymond,
 - Add a text field to my feature layer containig svg, and somehow make
 qgis display that on my map;
>>>
>>> This should work, no ?
>>
>> Are you sure? This would mean that the value(!) of an attribute would
>> contain the actual svg (code, not filename).
>> Any example on how to use that with styling then?
> 
> Hmmm exact, I don't think you can include the content (I tried to
> include a data url but it does not work).
> 
>>
 - Add a text field to my feature layer containig a path to a png (or
 svg), and somehow make qgis display that on my map.
>>>
>>> An SVG marker with the file name defined as an expression ?
>>
>> Same here, while we managed to get for example colors dynamic, we could
>> not find a way (yet) to set the marker-svg once filename is retrieved
>> from an attribute...
>>
>> Happy to get an example or pointers :-)
> 
> with an SVG-marker the filename can be "data-defined", so you can for
> instance use an expression like '/xxx/mymarker_' || id || '.svg'
> 
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-23 Thread Hugo Mercier
On 22/06/2016 19:06, Richard Duivenvoorde wrote:
> On 22-06-16 14:39, Hugo Mercier wrote:
>> Hi Raymond,
>>> - Add a text field to my feature layer containig svg, and somehow make
>>> qgis display that on my map;
>>
>> This should work, no ?
> 
> Are you sure? This would mean that the value(!) of an attribute would
> contain the actual svg (code, not filename).
> Any example on how to use that with styling then?

Hmmm exact, I don't think you can include the content (I tried to
include a data url but it does not work).

> 
>>> - Add a text field to my feature layer containig a path to a png (or
>>> svg), and somehow make qgis display that on my map.
>>
>> An SVG marker with the file name defined as an expression ?
> 
> Same here, while we managed to get for example colors dynamic, we could
> not find a way (yet) to set the marker-svg once filename is retrieved
> from an attribute...
> 
> Happy to get an example or pointers :-)

with an SVG-marker the filename can be "data-defined", so you can for
instance use an expression like '/xxx/mymarker_' || id || '.svg'


___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-22 Thread Richard Duivenvoorde
On 22-06-16 14:39, Hugo Mercier wrote:
> Hi Raymond,
>> - Add a text field to my feature layer containig svg, and somehow make
>> qgis display that on my map;
> 
> This should work, no ?

Are you sure? This would mean that the value(!) of an attribute would
contain the actual svg (code, not filename).
Any example on how to use that with styling then?

>> - Add a text field to my feature layer containig a path to a png (or
>> svg), and somehow make qgis display that on my map.
> 
> An SVG marker with the file name defined as an expression ?

Same here, while we managed to get for example colors dynamic, we could
not find a way (yet) to set the marker-svg once filename is retrieved
from an attribute...

Happy to get an example or pointers :-)

Regards,

Richard Duivenvoorde

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-22 Thread Hugo Mercier
Hi Raymond,

On 22/06/2016 14:19, Raymond Nijssen wrote:
> Dear developers,
> 
> Can I somehow show custom images for each point feature on a map,
> similar to the layer diagrams?
> 
> Having locations with a few sensor values, I'd like to generate a custom
> image for every feature (for example svg or png) and have it displayed
> on my feature.
> 
> I've come up with some ideas:
> 
> - Create many custom svg files in a directory linked to qgis, and
> afterwards create a long rule-based style for every unique feature;
> 
> - Add a text field to my feature layer containig svg, and somehow make
> qgis display that on my map;

This should work, no ?

> 
> - Add a text field to my feature layer containig a path to a png (or
> svg), and somehow make qgis display that on my map.

An SVG marker with the file name defined as an expression ?





___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

Re: [Qgis-developer] custom charts?

2016-06-22 Thread Marco Bernasocchi
are maptips an option or do you need always on images?
in 2.16 you'll be able to have full html maptips which would solve your
issue.

ciao
Marco

On 23.06.2016 00:19, Raymond Nijssen wrote:
> Dear developers,
> 
> Can I somehow show custom images for each point feature on a map,
> similar to the layer diagrams?
> 
> Having locations with a few sensor values, I'd like to generate a custom
> image for every feature (for example svg or png) and have it displayed
> on my feature.
> 
> I've come up with some ideas:
> 
> - Create many custom svg files in a directory linked to qgis, and
> afterwards create a long rule-based style for every unique feature;
> 
> - Add a text field to my feature layer containig svg, and somehow make
> qgis display that on my map;
> 
> - Add a text field to my feature layer containig a path to a png (or
> svg), and somehow make qgis display that on my map.
> 
> None of those options seems to be possible. Does anybody know a solution?
> 
> Thanks!
> 
> Raymond
> 
> ___
> Qgis-developer mailing list
> Qgis-developer@lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> 

-- 
Marco Bernasocchi
OPENGIS.ch - berna.io - 27summits.ch
___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer

[Qgis-developer] custom charts?

2016-06-22 Thread Raymond Nijssen
Dear developers,

Can I somehow show custom images for each point feature on a map,
similar to the layer diagrams?

Having locations with a few sensor values, I'd like to generate a custom
image for every feature (for example svg or png) and have it displayed
on my feature.

I've come up with some ideas:

- Create many custom svg files in a directory linked to qgis, and
afterwards create a long rule-based style for every unique feature;

- Add a text field to my feature layer containig svg, and somehow make
qgis display that on my map;

- Add a text field to my feature layer containig a path to a png (or
svg), and somehow make qgis display that on my map.

None of those options seems to be possible. Does anybody know a solution?

Thanks!

Raymond

___
Qgis-developer mailing list
Qgis-developer@lists.osgeo.org
List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer