#3151 closed defect (fixed)
Curved labels with MINFEATURESIZE auto doesn't work
Reported by: | aboudreault | Owned by: | aboudreault |
---|---|---|---|
Priority: | normal | Milestone: | 5.6 release |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | curved label, minfeaturesize |
Cc: | jmckenna |
Description
Jeff McKenna has reported that bug on the mailing. If minfeaturesize auto is set with curved labels (ANGLE FOLLOW), no curved labels are drawn.
Change History (11)
comment:1 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 by , 14 years ago
FYI, the problem was that when adding a label path in the label cache object, the feature size "0.0" was used (that value is used in the msDrawLabelCache() function). The function msPolylineLabelPath() already check if the feature can be drawn depending of the minfeaturesize value before calculating the label path. Basically, the function msDrawLabelCache shouldn't recheck that value if the label is a labelPath. Now, I changed the value "0.0" for "-1" when a labelPath is added in the label cache object, and disabled the check in msDrawLabelCache() for that case.
comment:3 by , 14 years ago
Confused. Does this mean MINFEATURESIZE still doesn't work but now at least doesn't break anything? What about populating the feature size correctly? We must have the length of the path being labeled available in msPolylineLabelPath().
Steve
comment:5 by , 14 years ago
The minfeaturesize works perfectly now. Populating the feature size of the paths wouldn't be useful because at the moment, the minfeaturesize is already tested before the label path algorithm (which is OK... else we would have to calculate ALL label paths then.. verify the featuresize and eliminate all that doesn't match: overhead?). If the labelpath x is returned by the msPolylineLabelPath() function, that means the label can be drawn on the line and that it passed the minfeaturesize test.
All right, will back port this in 5.4.
comment:8 by , 14 years ago
Cc: | added |
---|
comment:9 by , 14 years ago
- frank applied this patch to the benchmarking 5.6.0beta2 build
- works great!
- http://64.222.187.168/cgi-bin/mapserv560beta2?MAP=/opt/benchmarking/mapserver/vector-by-merged.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=getmap&layers=roads-merged-labeled&STYLES=&SRS=EPSG:4269&WIDTH=950&HEIGHT=600&FORMAT=image/png&BBOX=-96.79344550384396,32.76888304968294,-96.78588564285151,32.77365769873079
- thanks Alan!
comment:11 by , 14 years ago
you caught me, you're right it's this layer instead that correctly shows it in action: http://64.222.187.168/cgi-bin/mapserv560beta2?MAP=/opt/benchmarking/mapserver/vector-by-merged.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=getmap&layers=roads-merged-labeled-minfeaturesize&STYLES=&SRS=EPSG:4269&WIDTH=950&HEIGHT=600&FORMAT=image/png&BBOX=-96.79344550384396,32.76888304968294,-96.78588564285151,32.77365769873079
...but i'll apply it to the other now. thanks for catching this!
Fixed and committed in r9379.