Re: [mapserver-users] SVG text
Thank you for the reply. But that is very disappointing. It appears that going to Cairo was essentially a step backwards, as this used to be possible and now it is not. Surely the value of this feature is clear... It makes SVGs smaller and more efficient (where text is involved) and makes them more editable. -- Jeff On Dec 31, 2013 7:14 AM, thomas bonfort thomas.bonf...@gmail.com wrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SVG text
Matt, excellent idea! I should also modify my statement. I am sure there were good reasons for going to Cairo. I don't want to say it was a step backwards generally. But for those of us that want to auto generate map labels, it was... -- Jeff On Dec 31, 2013 7:55 AM, Matt McClelland m...@wildwalks.com wrote: I would also like the SVG text feature. Thomas, could you guess at the hours (or cost) involved to add this? Maybe there are a few people with the need that can pitch in? Thanks Matt :) Sent from my iPhone On 31/12/2013, at 11:49 PM, Jefferson Williams jefferson.d.willi...@gmail.com wrote: Thank you for the reply. But that is very disappointing. It appears that going to Cairo was essentially a step backwards, as this used to be possible and now it is not. Surely the value of this feature is clear... It makes SVGs smaller and more efficient (where text is involved) and makes them more editable. -- Jeff On Dec 31, 2013 7:14 AM, thomas bonfort thomas.bonf...@gmail.com wrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SVG text
In doing some searching, I found this from a couple of years ago. I don't know if it is helpful or not, but it could be a starting point... http://lists.freedesktop.org/archives/cairo/2011-February/021777.html It turns out I raised this same question myself back then, and Thomas responded then too and provided the link above. I'm afraid I forgot about that! So, sorry for the duplication; but it's still a feature that seems valuable to me. Perhaps if there is enough interest this could be developed, as Matt suggests. On Tue, Dec 31, 2013 at 8:00 AM, Jefferson Williams jefferson.d.willi...@gmail.com wrote: Matt, excellent idea! I should also modify my statement. I am sure there were good reasons for going to Cairo. I don't want to say it was a step backwards generally. But for those of us that want to auto generate map labels, it was... -- Jeff On Dec 31, 2013 7:55 AM, Matt McClelland m...@wildwalks.com wrote: I would also like the SVG text feature. Thomas, could you guess at the hours (or cost) involved to add this? Maybe there are a few people with the need that can pitch in? Thanks Matt :) Sent from my iPhone On 31/12/2013, at 11:49 PM, Jefferson Williams jefferson.d.willi...@gmail.com wrote: Thank you for the reply. But that is very disappointing. It appears that going to Cairo was essentially a step backwards, as this used to be possible and now it is not. Surely the value of this feature is clear... It makes SVGs smaller and more efficient (where text is involved) and makes them more editable. -- Jeff On Dec 31, 2013 7:14 AM, thomas bonfort thomas.bonf...@gmail.com wrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SVG text
When you say a specific rendering driver... I am not a professional programmer and am not trying to speak above my level, but it seems to me that producing a text element in an SVG file is a fairly trivial task compared to rendering the text into vectors, which is what Cairo does now. The text doesn't need to be rendered at all, but simply inserted into a text element such as this example from w3.org: text x=250 y=150 font-family=Verdana font-size=55 fill=blue Hello, out there/text Thoughts? I realize that this is a Cairo issue, not a Mapserver issue, since the SVG rendering was moved out of Mapserver; but would you agree that this would be a fairly simple task from a programming perspective? On Tue, Dec 31, 2013 at 7:14 AM, thomas bonfort thomas.bonf...@gmail.comwrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SVG text
I understand all of that. I have never suggested that the SVG code be brought back into Mapserver. As I said quite clearly, I realize that it is a Cairo issue. But surely as a project that utilizes Cairo, and one that would benefit from the use of text elements in SVGs (as used to be the case before Cairo was chosen), Mapserver could have some role in promoting the addition of that feature to Cairo. On Tue, Dec 31, 2013 at 9:40 AM, thomas bonfort thomas.bonf...@gmail.comwrote: Jefferson, We cannot simply add text elements ourselves, as the cairo svg renderer is a blackbox we can only access through the cairo api. Given the patches proposed to cairo, I would indeed be inclined to believe that the feature is rather trivial to implement, however I'm pretty sure the cairo folks have some sound philosophical or technical reasons for not including it as-is. You may also have a look at https://bugs.freedesktop.org/show_bug.cgi?id=38516 which has a bit of useful information. Specifically for mapserver, it would be vastly more efficient in the long and short term if this were to be added to cairo. If that was never going to be the case, then a specific rendering driver would need to be implemented to bypass cairo completely, the extent of the effort for that is very dependent on the scope of the features that would be supported (simple lines, polygons and text would be rather trivial, but there's much more complexity when adding other symbols) - basically, we would need to reimplement most of the cairo svg driver. regards, thomas On 31 December 2013 15:22, Jefferson Williams jefferson.d.willi...@gmail.com wrote: When you say a specific rendering driver... I am not a professional programmer and am not trying to speak above my level, but it seems to me that producing a text element in an SVG file is a fairly trivial task compared to rendering the text into vectors, which is what Cairo does now. The text doesn't need to be rendered at all, but simply inserted into a text element such as this example from w3.org: text x=250 y=150 font-family=Verdana font-size=55 fill=blue Hello, out there/text Thoughts? I realize that this is a Cairo issue, not a Mapserver issue, since the SVG rendering was moved out of Mapserver; but would you agree that this would be a fairly simple task from a programming perspective? On Tue, Dec 31, 2013 at 7:14 AM, thomas bonfort thomas.bonf...@gmail.com wrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff Williams -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] SVG text
That all makes sense. Thanks for the response. I guess from my limited perspective, I lost some useful functionality when Cairo was adopted for SVG rendering, and it's a bit frustrating; but it does still work. If they can integrate that functionality it would certainly be great, even as a selectable option (either to use text elements or not). Thanks to you and Thomas. On Tue, Dec 31, 2013 at 9:58 AM, Stephen Woodbridge wood...@swoodbridge.com wrote: On 12/31/2013 9:22 AM, Jefferson Williams wrote: When you say a specific rendering driver... I am not a professional programmer and am not trying to speak above my level, but it seems to me that producing a text element in an SVG file is a fairly trivial task compared to rendering the text into vectors, which is what Cairo does now. The text doesn't need to be rendered at all, but simply inserted into a text element such as this example from w3.org http://w3.org: text x=250 y=150 font-family=Verdana font-size=55 fill=blue Hello, out there/text Thoughts? I realize that this is a Cairo issue, not a Mapserver issue, since the SVG rendering was moved out of Mapserver; but would you agree that this would be a fairly simple task from a programming perspective? The concept is simple as you state, but you are missing the expectation that the SVG text looks simpler if not the same as the text rendered by other drivers. So while you only have to dump the text there is still a lot of work to compute the size, position, scaling, orientation, etc for that piece of text and then you have to also deal with text rendered along a line which is rendered as glyphs not strings, not to mention how you want to deal with rendering texts like Arabic and other script like texts. So yes, straight forward until you start trying to make things like similar. If you got an SVG where you only needed to change one text string but instead had to fiddle with all of them because of the above issues, that I think would not be a good solution. My guess today if you take an SVG file into something like inkscape, it is a fairly easy process to window the text vectors and replace them with a new text element, even if it is annoying. That said, I'm not saying that this is a bad idea as I can see it might be very useful. I'm only trying to set an appropriate expectation to the size of the effort. I'll leave the details to Thomas. -Steve W On Tue, Dec 31, 2013 at 7:14 AM, thomas bonfort thomas.bonf...@gmail.com mailto:thomas.bonf...@gmail.com wrote: Jefferson, There is currently no way to produce those elements with mapserver, and to my knowledge there are no plans to do so yet. A specific rendering driver would need to be implemented to achieve this, but has not yet been funded or proposed. regards, thomas On 24 December 2013 17:42, Jefferson Williams jefferson.d.willi...@gmail.com mailto:jefferson.d.willi...@gmail.com wrote: I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org mailto:mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Mapserver 6.4 PHP Mapscript
I'm compiling Mapserver 6.4 on a 64-bit Fedora 19 system. It compiles fine. Here's my cmake command line: CC=gcc34 cmake -DWITH_POSTGIS=0 -DWITH_PHP=1 -DWITH_ICONV=0 -DPHP5_EXTENSION_DIR=./ -DWITH_KML=1 -DWITH_RSVG=1 .. However, upon starting Apache httpd with this module enabled, I get this error in the error_log: PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - /usr/lib64/php/modules/php_mapscript.so: undefined symbol: __sync_sub_and_fetch in Unknown on line 0 Anyone else run into this? I'm really looking forward to getting into 6.4, as I read that text is converted to text elements when using SVG output. 6.2.1 doesn't do this, but rather converts text to paths -- which are bulky, and also cannot be edited as text afterwards. I think this sync_sub_and_fetch error is all that's standing in my way. At least, I hope... Thanks! -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] SVG text
I'm a long-time user of PHP Mapscript and have written code to produce maps for Wikipedia. Older versions of Mapscript produced SVG files that contained text elements. In more recent versions, text is produced as a series of vectors instead, which means that the text cannot be edited. Often auto-generated maps need to be tweaked in various ways before they are ready for the public. Now I can move text, but I cannot edit it. Is there a way with 6.2 or 6.4 that labels can be produced as text elements in the resulting SVG file? -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
Re: [mapserver-users] Cairo and text elements
Thanks. I agree it's largely a Cairo issue at this point, but the decision to move to Cairo for SVG output has broken existing processes (for me, at least) with no workaround except downgrading -- unless that user-submitted Cairo patch works, which I will look into. I just wanted to see if anyone else was concerned about this and had any thoughts, but I will also try to talk to the Cairo group about it. However, the latest release of Cairo (1.10.2), came out nearly a year ago, so I'm not sure how actively it is currently being developed. On Tue, Oct 18, 2011 at 8:13 AM, thomas bonfort thomas.bonf...@gmail.comwrote: I agree this would be a nice feature to have, but this concerns the cairo library. Once cairo supports this kind of text placement, we can have a look at how to support it inside mapserver. you might want to have a look at http://lists.freedesktop.org/archives/cairo/2011-February/021777.html for a cairo patch. I don't know if this can be picked up by mapserver without patching its cairo calls. regards, Thomas -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users
[mapserver-users] Cairo and text elements
For some years now, I have been using PHP MapScript with my own code to make SVG maps for use on Wikipedia. Since these are static maps, I typically tweak them with an editor (moving or editing labels, re-positioning or re-sizing highway shields, et cetera) to make the maps look as good as possible. Upon upgrading to MapServer 6.0.1, I found that with Cairo handling the SVG output, I can no longer modify the labels. It also makes the SVG files about three times larger in this application. I understand the rationale that I've read on this, in terms of ensuring that an SVG looks consistent across many different viewers; but it's not ideal for all applications. I'm wondering if there are any plans for MapServer/Cairo to allow the option of producing text through text elements. For now I will probably move back to MapScript 5.6, but some of the new features in 6.0 would be very useful. -- Jeff Williams ___ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users