From: Thomas J. <th...@ug...> - 2009-02-17 13:23:12
|
Hello I am just starting to use filtering for WMS images. I wish to filter roads based on a list of IDs. The SQL equivalent I want to do is "WHERE link_id IN (5500, 6600, 1111, 2154)". Such syntax doesn't work in CQL. They have some functions in2, in3, up till in10, but these are open-ended lists that can count in the thousands. Are there some special syntax for CQL for this? Does OGC filters support it? I see there is a FID-filter that takes a list of comma-separated IDs. Is it possible to make Feature ID use the primary key of the data source table instead of some pseudorandom sequence that is completely useless for everything? The road network is stored in a PostGIS database. Before anyone asks, this is needed for a route calculator. Our calculator... calculates... the route and returns the path as a sequence of road IDs. So naturally long routes have a lot of roads, and every route is different. I know that if I absolutely have to, I can reshape the query to "link_id = 5500 OR link_id = 6600 OR link_id = 1111 OR ...", but I would rather not. It is verbose, and I already have the list comma-separated. Kind regards Ugland IT Group AS Thomas Jahnsen Developer Tel: + 47 67 59 28 23 E-mail: th...@ug... UGLAND IT GROUP AS, Strandveien 13, Pb. 58, 1324 Lysaker, org.nr. 971 058 773 Tlf: +47 67 59 28 10, fax: +47 67 59 28 11, email: fir...@ug...<mailto:fir...@ug...>, internet: www.uglandit.com<http://www.uglandit.com/> |