[Featureserver] Assorted problems

Peter Robins fs at peterrobins.co.uk
Sat Mar 28 14:35:19 EDT 2009


On Friday 27 Mar 2009, Peter Robins wrote:
> On Friday 27 Mar 2009, Christopher Schmidt wrote:
> > Yeah, using 'str' like that is a bug. Should be str(props[key],
> > "utf-8"). If you test that and it works, give me a patch and I'll apply
> > it.
>
> no, that gives me "str() takes at most 1 argument". Afraid my knowledge of
> Python is pretty much non-existent. I tried "props[key].encode("utf-8")"

encode("latin-1") seems to work, which makes sense as the url is 
encoded into latin-1. Patch attached, though as I say I'm no Python expert, 
so there may well be a better way of doing this.

On Friday 27 Mar 2009, Christopher Schmidt wrote:
> > 6. For completeness, http://featureserver.org/doc/DataSources.html could
> > do with an SQLite example:
> >
> > [myfeatures]
> > type=SQLite
> > file=/home/example/features.sqlite
>
> Updated in svn.

would suggest updating the existing SQLite entry :-) Also included in patch.

There's another problem with loading data from kml files. For some reason, 
polygon and point coords are converted to floats, but linestrings aren't. 
Bbox query (and hence wfs output) doesn't seem to work on string coordinates. 
The attached patch should fix this.

On the subject of bbox queries, I'm dealing with very large linestrings (gps 
track type of thing over several hundred km). Is there any way to get it to 
return only that part of the linestring which falls within the bbox?

Also, how do I set the crs?


When I try to add features with trunk using curl I get 

echo '{"id":1, "geometry":{"type":"Point", "coordinates":[[0,7]]}}' | curl -d 
@- http://localhost/cgi-bin/featureserver/featureserver.cgi/scribble/all.json
An error occurred: Unable to determine bounding box for feature: list index 
out of range.

Presumably this means the layout of the feature has changed? What should 
the 'echo' now be?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patches
Type: text/x-diff
Size: 1269 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/featureserver/attachments/20090328/716ded12/patches.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kmlpatch
Type: text/x-diff
Size: 606 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/featureserver/attachments/20090328/716ded12/kmlpatch.bin


More information about the Featureserver mailing list