[Geoserver-users] Label fit problem when followLine=on
Hi! Is there any way to render a label with followLine=on if the label doesn't fit on the line (the line is too short for the whole label) ? A fallback to followLine=off would be a nice feature in this case. Cheers! - Anssi -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Road number labeling difficulties
I think my problem could be solved by minGroupDistance but that option doesn’t seem to do anything in Geoserver 2.9.0. From: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] On Behalf Of Andrea Aime Sent: 3. heinäkuuta 2016 23:14 To: Kanninen Anssi EXT Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Road number labeling difficulties On Sun, Jul 3, 2016 at 9:31 PM, Kanninen Anssi EXT <anssi.kanni...@digia.com<mailto:anssi.kanni...@digia.com>> wrote: Hi Andrea! There may indeed be some discontinuation between the segments but what would that change? I still want the labels have an equal space between them. It would allow the JTS LineMerge algorithm to create one single large line, that is then labelled according to the other directives (repeate) The example data in my screenshots is the example data provided by Geoserver so I assume it is be valid. Err... that data has been heavily simplified to keep the size of the download small, so I would not count on it being valid. That said, I re-read your first mail properly (10pm saturday night, I'm not in a rush like in a usual work day) and took the time to actually setup the style on a demo server: http://demo.geo-solutions.it/geoserver/tiger/wms?service=WMS=1.1.0=GetMap=tiger:tiger_roads=r11=-74.02722,40.684221,-73.907005,40.878178=476=768=EPSG:4326=application/openlayers#toggle At least in some parts the data is actually disconnected, or otherwise not forming a single line, e.g.: http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS=1.1.1=GetMap=image%2Fpng=true=r11=tiger%3Atiger_roads=EPSG%3A4326=1600=768=-73.99920701980591%2C40.75648784637451%2C-73.96487474441528%2C40.77296733856201 http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS=1.1.1=GetMap=image%2Fpng=true=r11=tiger%3Atiger_roads=EPSG%3A4326=950=600=-73.9958381652832%2C40.73277711868286%2C-73.98564577102661%2C40.7392144203186 http://demo.geo-solutions.it/geoserver/tiger/wms?SERVICE=WMS=1.1.1=GetMap=image%2Fpng=true=r11=tiger%3Atiger_roads=EPSG%3A4326=950=600=-74.01639461517334%2C40.70351421833038%2C-74.01129841804504%2C40.706732869148254 In other cases however it might a numeric issue, since by the time the labeller gets the lines they have been generalized and transformed to screen space, but with different roundings (what was touching before might not be exactly touching after). I did not investigate further, but there might be room for improvement there... I'm not sure it's going to be a quick fix however, I guess we'd have to round all ordinates to the nearest pixel before trying to attempt the LineMerge. That said, it's speculation, might be something else. Cheers Andrea -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc. --- -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, C
Re: [Geoserver-users] Road number labeling difficulties
Hi Andrea! There may indeed be some discontinuation between the segments but what would that change? I still want the labels have an equal space between them. The example data in my screenshots is the example data provided by Geoserver so I assume it is be valid. Cheers! - Anssi From: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] On Behalf Of Andrea Aime Sent: 1. heinäkuuta 2016 16:31 To: Kanninen Anssi EXT Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Road number labeling difficulties On Fri, Jul 1, 2016 at 3:17 PM, Kanninen Anssi EXT <anssi.kanni...@digia.com<mailto:anssi.kanni...@digia.com>> wrote: Hi Andrea and thank you for the answer! The screenshots are from Geoserver layer preview without any tiling enabled. If I use grouping with repeating, it only shows the labels in the longest path. If I add “labelAllGroups”, there’s too much of labels, too close to each other. Hum... GeoServer uses JTS to put toghether the line segments into a long line... normally it works, when it does not, it's normally and indication that the lines are not really touching each other, which makes JTS unable to bring them toghether into a single long line. Could that be your case? Cheers Andrea -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc. --- -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Road number labeling difficulties
Hi Andrea and thank you for the answer! The screenshots are from Geoserver layer preview without any tiling enabled. If I use grouping with repeating, it only shows the labels in the longest path. If I add “labelAllGroups”, there’s too much of labels, too close to each other. Best regards, Anssi From: andrea.a...@gmail.com [mailto:andrea.a...@gmail.com] On Behalf Of Andrea Aime Sent: 1. heinäkuuta 2016 14:52 To: Kanninen Anssi EXT Cc: geoserver-users@lists.sourceforge.net Subject: Re: [Geoserver-users] Road number labeling difficulties Hi, are there screenshots you're posting from a tiling client? Does the labeling work fine if you look at the GeoServer layer preview without tiling enabled? The solution should be group, group all with an eventual repeat, but if you are tiling there is one labelling run per tile, the system is not aware of what happens in the nearby tiles. The minGroupDistance option is still there and I see it used in the code. Cheers Andrea On Thu, Jun 30, 2016 at 10:46 AM, Kanninen Anssi EXT <anssi.kanni...@digia.com<mailto:anssi.kanni...@digia.com>> wrote: Hello everybody and greetings from sunny Finland! First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles. But I've got some difficulties when labeling roads and zooming the map out. We've got some long roads with dozens of segments, all having the road number as an attribute. I want the road number labels to be show along the long road with an equals distance from each other. * When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png). * When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png). * Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png). (The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.) So, how can I display the labels along all the visible road segments, not too close or not too far away from each other? Thank you! Best regards, Anssi Kanninen -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net<mailto:Geoserver-users@lists.sourceforge.net> https://lists.sourceforge.net/lists/listinfo/geoserver-users -- == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it AVVERTENZE AI SENSI DEL D.Lgs. 196/2003 Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo è consentito esclusivamente al destinatario del messaggio, per le finalità indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro sistema. Conservare il messaggio stesso, divulgarlo anche in parte, distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse, costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003. The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messa
Re: [Geoserver-users] Road number labeling difficulties
We once had minGroupDistance - any idea where it vanished? -Original Message- From: Kanninen Anssi EXT [mailto:anssi.kanni...@digia.com] Sent: 30. kesäkuuta 2016 12:10 To: 'geoserver-users@lists.sourceforge.net' Subject: Re: [Geoserver-users] Road number labeling difficulties This is the style I used. Labeling options are in the bottom: -8<-8<-8<8< http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld; xmlns:ogc="http://www.opengis.net/ogc; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> area landmarks Feature NAME Broadway #66 2 NAME Broadway #66 7 Feature NAME Broadway #FF 4 NAME Broadway R11 Times New Roman Normal 14 bold 2 #FF 0.85 #00 100 true true 8<-8<-8<-8<-8<----- -Original Message- From: Kanninen Anssi EXT [mailto:anssi.kanni...@digia.com] Sent: 30. kesäkuuta 2016 11:47 To: 'geoserver-users@lists.sourceforge.net' Subject: [Geoserver-users] Road number labeling difficulties Hello everybody and greetings from sunny Finland! First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles. But I've got some difficulties when labeling roads and zooming the map out. We've got some long roads with dozens of segments, all having the road number as an attribute. I want the road number labels to be show along the long road with an equals distance from each other. * When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png). * When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png). * Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png). (The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.) So, how can I display the labels along all the visible road segments, not too close or not too far away from each other? Thank you! Best regards, Anssi Kanninen -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users
Re: [Geoserver-users] Road number labeling difficulties
This is the style I used. Labeling options are in the bottom: -8<-8<-8<8< http://www.opengis.net/sld StyledLayerDescriptor.xsd" xmlns="http://www.opengis.net/sld; xmlns:ogc="http://www.opengis.net/ogc; xmlns:xlink="http://www.w3.org/1999/xlink; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;> area landmarks Feature NAME Broadway #66 2 NAME Broadway #66 7 Feature NAME Broadway #FF 4 NAME Broadway R11 Times New Roman Normal 14 bold 2 #FF 0.85 #00 100 true true 8<-8<-8<-8<-8<----- -Original Message- From: Kanninen Anssi EXT [mailto:anssi.kanni...@digia.com] Sent: 30. kesäkuuta 2016 11:47 To: 'geoserver-users@lists.sourceforge.net' Subject: [Geoserver-users] Road number labeling difficulties Hello everybody and greetings from sunny Finland! First of all, Geoserver is great! I'm amazed how fast it renders layergroups with almost 100 layers having different styles. But I've got some difficulties when labeling roads and zooming the map out. We've got some long roads with dozens of segments, all having the road number as an attribute. I want the road number labels to be show along the long road with an equals distance from each other. * When I zoom in with just two or three segments visible, the VendorOption "repeat" is enough. The labels are displayed nicely along the road (sample1.png). * When I zoom out, I can not label all the segments anymore because the labels come too close to each other (sample2.png). So I will add VendorOption "group". But it only shows the labels in the longest path and not the labels on the other (possible slightly disjoint) segments (sample3.png). * Then I add "labelAllGroup". But again, I get too much labels because every segment will have it (sample4.png). (The example data is tiger_roads with only Broadway visible and an imaginary road number "R11" for all the segments.) So, how can I display the labels along all the visible road segments, not too close or not too far away from each other? Thank you! Best regards, Anssi Kanninen -- Attend Shape: An AT Tech Expo July 15-16. Meet us at AT Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape ___ Geoserver-users mailing list Geoserver-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geoserver-users