[Geoserver-users] SLD with filter - general questions from newbie!

Hi,

I have been compiling a group layer in geoserver. The layer consists of about 20
shps, and each shape has it´s own SLD.

The Group layer is a land-use plan for a town, and eventually i will be looking
into the possibility of compiling up to 50 group layers.

This means that I will need 50x20=1000 layers.

And now the questions: ...

1. WMS: - When I get a getCapabilities request...I don´t want to save to see
1000 layers...I just want to see the 50 group layers...can I somehow disable the
individual layers but enable the group-layer layers?

2. SLD: - All of the landuse plans consist of the same SHPs. But not all the
SHPs have the same contents. How can I use a Filter with

PropertyIsEqualTo> when there are missing values?

     EXAMPLE:
Town A has "Bus station", and Fire station" in the attribute Field
"PublicAmenities"

Town B has "Fire station" and "Library" ( but no "Bus station")

If the SLD is filtered to symbolize Bus station, Fire station AND Library....
but "TOWN A" has no "Library" and "TOWN B" has no "Bus station" then no features
will appear!

At least this is what has happened for me when I try to display a filtered SLD
in which an attribute value is missing.

What do I do with a filter which tries to symbolize an attribute in a field
which is missing?

Thanks for any help,
yours,

Robert Buckley

Robert,

Not sure about 1, but I can give you some pointers for 2:

  • use ogc:PropertyIsLike instead. Your wildcard would be for example “*”. Then use “firestation” as a value to draw all towns that contain have the value firestation somewhere in the column of “PublicAmenities”.
  • do some data preprocessing instead on your shape files (better still, import them in PostGIS and do some preprocessing there). So you add an extra column that has either 0 or 1 in case the column PublicAmenities contains the values firestation. You can build an index on the new column and its numerical, so I reckon quicker access instead of having to do text parsing on the fly using filters…

HTH,

Edward

Date: Fri, 23 Jul 2010 07:30:46 +0000
From: robertdbuckley@anonymised.com
To: geoserver-users@lists.sourceforge.net
Subject: [Geoserver-users] SLD with filter - general questions from newbie!

Hi,

I have been compiling a group layer in geoserver. The layer consists of about 20
shps, and each shape has it´s own SLD.

The Group layer is a land-use plan for a town, and eventually i will be looking
into the possibility of compiling up to 50 group layers.

This means that I will need 50x20=1000 layers.

And now the questions: …

  1. WMS: - When I get a getCapabilities request…I don´t want to save to see
    1000 layers…I just want to see the 50 group layers…can I somehow disable the
    individual layers but enable the group-layer layers?

  2. SLD: - All of the landuse plans consist of the same SHPs. But not all the
    SHPs have the same contents. How can I use a Filter with

PropertyIsEqualTo> when there are missing values?

EXAMPLE:
Town A has “Bus station”, and Fire station" in the attribute Field
“PublicAmenities”

Town B has “Fire station” and “Library” ( but no “Bus station”)

If the SLD is filtered to symbolize Bus station, Fire station AND Library…
but “TOWN A” has no “Library” and “TOWN B” has no “Bus station” then no features
will appear!

At least this is what has happened for me when I try to display a filtered SLD
in which an attribute value is missing.

What do I do with a filter which tries to symbolize an attribute in a field
which is missing?

Thanks for any help,
yours,

Robert Buckley


This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/firsthttp://p.sf.net/sfu/sprint-com-first


Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Robert Buckley wrote:

Hi,

I have been compiling a group layer in geoserver. The layer consists of about 20 shps, and each shape has it´s own SLD.

The Group layer is a land-use plan for a town, and eventually i will be looking into the possibility of compiling up to 50 group layers.

This means that I will need 50x20=1000 layers.

And now the questions: ...

1. WMS: - When I get a getCapabilities request...I don´t want to save to see 1000 layers...I just want to see the 50 group layers...can I somehow disable the individual layers but enable the group-layer layers?

Not possible, no.
And yes, in general avoid having a mix of that many layers with different structures, import everything in postgis and create indexes, or you really risk to get a very slow map

Cheers
Andrea

On Fri, Jul 23, 2010 at 3:30 AM, Robert Buckley
<robertdbuckley@anonymised.com> wrote:

2. SLD: - All of the landuse plans consist of the same SHPs. But not all the
SHPs have the same contents. How can I use a Filter with

PropertyIsEqualTo> when there are missing values?

EXAMPLE:

Town A has "Bus station", and Fire station" in the attribute Field
"PublicAmenities"

Town B has "Fire station" and "Library" ( but no "Bus station")

If the SLD is filtered to symbolize Bus station, Fire station AND Library....
but "TOWN A" has no "Library" and "TOWN B" has no "Bus station" then no features
will appear!

It sounds like you need an OR filter instead of an AND filter. But
wouldn't it be more useful to have a different symbol for bus
stations, fire stations and libraries by having three different rules?

Ian
--
Ian Turton