Labelling cities and lakes with Tiger data (EntityNames

Stephen Woodbridge woodbri at SWOODBRIDGE.COM
Tue Jan 11 19:22:58 EST 2005


There is a tiger file that has internal points of all polygons. you can
use this for a label point. On the other hand, if you just have
mapserver label the polygon it will place the label on the polygon, only
you don't have a lot of control where.

Another thing you could do is compute the average lat/long of the
polygon points which will give you something like a centroid, but this
is not garraunteed to be on the polygon, think of a polygon like the
letter "C", and it will be floating inside the "C" but not on the "C".

-Steve W.

Colin McGuigan wrote:
> I've got Mapserver serving up some tiger data, and everything's working
> well, except for one point that's bothering me: cities and lakes aren't
> labelled.
>
> I've loaded all the Tiger data into PostGIS.  There's an EntityNames
> table that holds the names I'm looking for, but there seems to be
> absolutely no way to join it to anything else.  The only field with any
> uniqueness (aside from name, of course) is fips -- but no other table
> seems to hold corresponding values.  I can only assume somewhere there
> is a point or polygon that defines, eg, "Lake Michigan", but I can't
> seem to find it to save my life.
>
> Anyone run into this before?
>
> --Colin McGuigan
>



More information about the mapserver-users mailing list