[TinyOWS-users] Making WFS queries against hstore attribute
Jukka.Rahkonen at mmmtike.fi
Fri May 6 07:13:48 EST 2011
TinyOWS can read attributes of datatype "hstore" from PostGIS and
publish them through WFS fine.
Here is an example DescribeFeatureType request
The second last attribute "tags" is a hstore columg in the database. In
the TinyOWS schema it is translated into string
<xs:element name="tags" type="string" nillable="true" minOccurs="0"
This is an example of GetFeature
It returns all the tags in one string like
This is nice. It would be even more cool to be able to do also queries
by hstore attributes but I guess it is not possible at the moment. What
do you think, could it be possible to convert for example WFS
PropertyIsEqualTo filters by TinyOWS server so that they would work
against PostgreSQL hstore column?
The SQL syntax with hstore looks odd and I do not really understand it
yet, but queries like these are working
select * FROM osm_polygon where ((tags->'building') = 'yes');
select * from osm_polygon where (tags @>'building=>yes')
What I am thinking that perhaps, if WFS GetFeature would contain this
kind of filter
then if TinyOWS recognises that tags column in the database is of
datatype "hstore", it would convert the filter into
where ((tags->'building') = 'yes')
Does this sound like a useful feature and possible to implement?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the TinyOWS-users