[Geoserver-users] Filtering features with names in multiple languages

Hi all,

The database I'm working with is multilingual and has multiple records for
each feature: one record for each name that the feature has. All of the
records for a given feature have the same fid value. (See below for an
excerpt of the data.)

I'm trying to set up rules that will allow the user to rank language
preferences, so that if a user's preferences are [ 1) English, 2) Tibetan ],
and a feature doesn't have a name in English, but has a Tibetan name, the
feature's label will be in Tibetan. If the feature doesn't have a name in
either language, it should still be drawn, but without a label.

So, I've been trying to find a way to create SLD rules for this, but it
seems like all the styling is done on a record-by-record basis. I can't
find a way to refer to multiple records with the same fid at once, which
seems necessary to determine which record is displayed for each fid. (Maybe
I'm approaching this in the wrong way, though?) I also looked into using
CQL_FILTER to possibly do some kind of sorting/grouping, also to no success.

Any ideas for this? Even if you don't have a complete solution, a little
help to get me started would be greatly appreciated.

Thanks,
Tom

Data excerpt:
<gml:featureMember>
<thdl:fid>1</thdl:fid>
<thdl:language>English</thdl:language>
<thdl:name>China</thdl:name>
</gml:featureMember>

<gml:featureMember>
<thdl:fid>1</thdl:fid>
<thdl:language>Tibetan</thdl:language>
<thdl:name>rgya nag</thdl:name>
</gml:featureMember>
--
View this message in context: http://www.nabble.com/Filtering-features-with-names-in-multiple-languages-tp23175858p23175858.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

To add more detail about the data's setup, I should mention that the features
don't all have the same set of languages for their names (e.g. one feature
might only have names in English and Chinese, and another might only have
names in Tibetan and Devanagari). Also, the features are being produced by
Views on an extremely complex PostGIS datastore.

I'm still lost on how to approach this. Any ideas?

Thanks,
Tom

Tom B wrote:

Hi all,

The database I'm working with is multilingual and has multiple records for
each feature: one record for each name that the feature has. All of the
records for a given feature have the same fid value. (See below for an
excerpt of the data.)

I'm trying to set up rules that will allow the user to rank language
preferences, so that if a user's preferences are [ 1) English, 2) Tibetan
], and a feature doesn't have a name in English, but has a Tibetan name,
the feature's label will be in Tibetan. If the feature doesn't have a
name in either language, it should still be drawn, but without a label.

So, I've been trying to find a way to create SLD rules for this, but it
seems like all the styling is done on a record-by-record basis. I can't
find a way to refer to multiple records with the same fid at once, which
seems necessary to determine which record is displayed for each fid.
(Maybe I'm approaching this in the wrong way, though?) I also looked into
using CQL_FILTER to possibly do some kind of sorting/grouping, also to no
success.

Any ideas for this? Even if you don't have a complete solution, a little
help to get me started would be greatly appreciated.

Thanks,
Tom

Data excerpt:
<gml:featureMember>
<thdl:fid>1</thdl:fid>
<thdl:language>English</thdl:language>
<thdl:name>China</thdl:name>
</gml:featureMember>

<gml:featureMember>
<thdl:fid>1</thdl:fid>
<thdl:language>Tibetan</thdl:language>
<thdl:name>rgya nag</thdl:name>
</gml:featureMember>

--
View this message in context: http://www.nabble.com/Filtering-features-with-names-in-multiple-languages-tp23175858p23217746.html
Sent from the GeoServer - User mailing list archive at Nabble.com.