[Geoserver-users] Creating SLD with filters from two tables

Hi,

I hope I am not having a strange question here.

I currently have two database tables, A and B. Table A (with a geometry column) is used for a feature in GeoServer, and I have a SLD for this feature. The problem now here is that, I need to use a column from Table B as a filter in the SLD for the feature created from Table A.

Is it even possible to do this at all, or am I thinking of something unrealistic? I would greatly appreciate it if someone could enlighten me on this, and provide me with some pointers of how to do it if it ever can be done. Thank you.

Regards,
Lee Wai See

[This e-mail is confidential and may be priviledged. If you are not the
intended recipient, please kindly notify us immediately and delete the message
from your system; please do not copy or use it for any purpose, nor disclose
its contents to any other person. Thank you.]
---ST Electronics Group---


No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.14.5/534 - Release Date: 11/14/2006

Lee Wai See ha scritto:

Hi,

I hope I am not having a strange question here.

I currently have two database tables, A and B. Table A (with a geometry column) is used for a feature in GeoServer, and I have a SLD for this feature. The problem now here is that, I need to use a column from Table B as a filter in the SLD for the feature created from Table A.

Is it even possible to do this at all, or am I thinking of something unrealistic? I would greatly appreciate it if someone could enlighten me on this, and provide me with some pointers of how to do it if it ever can be done. Thank you.

Unrealistic no, but not directly supported in Geoserver.
The best answer I can give you is to build a view that joins A and B
and serve the view instead of table A.
Details may vary depending on the database, on postgis I believe you
would have to register the view against the geometry_columns metadata table to make the datastore recognize the geometric columns.

Cheers
Andrea