How to stop labels repeating so close to each other?
Hi guys,
First off, thanks for an amazing product. I'm having a great time experimenting with it. However, I've stumbled across a problem with my street labels- they repeat a little too much. I read the Q&A about merging the lines into one:
http://support.mapbox.com/discussions/tilemill/66-redundant-line-se...
which I've done, but I'm still seeing lots of repeats- take a look at the attached picture. I've doubled checked in the DB that there is, for example, only one 'Irving Place', but the names are still repeating close to each other. I've even tried setting:
text-min-distance: 5000;
text-spacing:5000;
which ought to mean they're incredibly far apart, right? I'm not sure what else I can do. Any help would be appreciated.
Thanks!
-
maplabeltest.png
101 KB
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by AJ on 06 Dec, 2011 04:32 PM
Hi Alastair,
I suspect my PostGIS query suggestion in the discussion you linked to might not actually be enough to solve this problem. In addition to doing a union on your segmented roads try doing a linemerge.
For already-unioned lines the query would be something like
SELECT ST_LineMerge(the_geom) FROM your_roads_table;. To do this on a fresh table that has not been unioned yet do something like this:These queries are expensive so you'll probably want to do them as an update or an insert so you only need to do them once.
Let me know if this improves things for you.
3 Posted by alastair on 06 Dec, 2011 04:45 PM
Hm, I ran a:
but it doesn't appear to have made a difference (and it ran surprisingly quickly). Does TileMill keep any kind of local cache of query results perhaps?
Thanks for the help!
Support Staff 4 Posted by Dane on 16 Dec, 2011 07:14 PM
Hi Alastair,
This may be a mapnik bug, or at least a lacking feature that this is not working for you. I'll put it in my queue to look at https://github.com/mapnik/mapnik/issues/995. Going to close this issue and track at mapnik issue tracker.
Dane closed this discussion on 16 Dec, 2011 07:14 PM.