[postgis-users] Holy cow are linestrings a problem
phat-ass
phat-ass at thinkheavyindustries.com
Thu Nov 29 13:17:44 PST 2007
After a good sleep on it, I think I got it. Thank-you.
Eric
Per-Olof Norén wrote:
> phat-ass at thinkheavyindustries.com skrev:
>> I've got geoserver up and running, and it's nice.
>>
>> I've got postgis talking to geoserver and that's nice.
>>
>> What I need to do is collect this awful .shp file of linestrings into
>> something I can display properly. I can't seem to figure out the
>> syntax for this.
>>
>> I'm lost in the world of duplicate labels!
>>
> Assuming you want to aggregate geometries based on a label column,
> you'd be using a group by based aproach in conjunction with the
> st_union functions.
>
> example:
> create table testdata (
> id serial primary key,
> label varchar(255),
> the_geom geometry -- created using addgeometrycolumn
> );
>
>
> select
> label,
> st_union(the_geom)
> from
> testdata
> group by
> label;
>
> OR:
>
> you could play with a custom SLD in geoserver containing a
> Textsymbolizer, naturally:
>
> <TextSymbolizer>
> ....
> <VendorOption name="group">yes</VendorOption>
> </TextSymbolizer>
>
> Grouping tries to reduce the number of times a label is written.
> I'd suggest that you further consult at the geoserver-users mail list
> regarding the SLD.
>
> cheers,
> Per-Olof
>
>
>
More information about the postgis-users
mailing list