[Featureserver] Assorted problems

Peter Robins fs at peterrobins.co.uk
Fri Mar 27 05:31:09 EDT 2009


I've been trying out featureserver; it worked fine with small amounts of test 
data, but I've been having a frustrating time trying to get it to work with 
real data.

1. trying to load kml data with whitespace, such as
    <LineString>
      <coordinates>
        -1.619196,42.963177,0.000000
        -1.617908,42.961761,0.000000
        -1.616836,42.960506,0.000000 . . .
-> Unable to determine bounding box for feature with geometry 
{'type': 'Line', 'coordinates': [[u'-1.619196', u'42.963177', u'0.000000'], 
[u''], [u''], [u''], [u''], [u''], [u''], [u''], [u'-1.617908', u'42.961761', 
u'0.000000'], [u''], [u''], [u''], [u''], [u''], [u''], [u''] ......
so seems not to be ignoring whitespace.

2. querying e.g. "?queryable=title&title=Trinidad" doesn't work; something to 
do with utf8 data in the field you're querying?
  'ascii' codec can't encode character u'\xe9' in position 12: ordinal not in 
range(128)
...
  File "/var/www/cgi-bin/FeatureServer/DataSource/DBM.py", line 108, in select
    (key in props and str(props[key]) != val):

3. on homepage, under "To set up your own FeatureServer:" says
echo '{"id":1, "geometry":{"type":"Point", "coordinates":[[0,5]]}}' | curl -d 
@- http://example.com/cgi-bin/featureserver-/featureserver.cgi/all.gml

This is wrong, isn't it? Surely the suffix on the server call should match the 
datasource, so should be 
http://example.com/cgi-bin/featureserver-/featureserver.cgi/layer/all.json 
(and gml is read only). On the other hand, it doesn't seem to matter what 
goes before the suffix; even using .../featureserver.cgi/layer/delete.json 
will add the feature

4. I'd suggest a global replace Berkley -> Berkeley on both programs and 
website. This is not just being pedantic. For example, 
http://featureserver.org/doc/DataSources.html says:
"A sample BerkleyDB configuration might look like:
[scribble]
type=BerkleyDB"
This won't work. There is no such datasource. (Not that BerkeleyDB works 
anyway; still a problem even in trunk "'BerkeleyDB' object has no 
attribute 'unique'".)

5. What's the status with trunk? I tried a checkout, thinking it might solve 
some of these issues, but it does not seem to be complete; for example, 
FeatureServer/Feature/ is missing. So looks like it hasn't been tested very 
much.

6. For completeness, http://featureserver.org/doc/DataSources.html could do 
with an SQLite example:

[myfeatures]
type=SQLite
file=/home/example/features.sqlite

seems to do the trick.



More information about the Featureserver mailing list