[Featureserver] curl usage issue

Yves Moisan yves.moisan at boreal-is.com
Fri Dec 5 10:02:29 EST 2008



> 
> Ok - so it sounds like now you're uploading valid geojson to the
> latest FS, and you're getting a different traceback than your last
> post.  

No I get the same message as mentioned previously.

> I would guess, based on your email saying you don't know what epsg
> your table has, and the fact you say it does have an enforce
> constraint, that it's not epsg:4326 as your config says, and that this
> is causing your error.
> 
> Try find out what srid you have, and ensure your FS layer definition
> matches that (SELECT st_srid(the_geom) should return the srid for
> stuff already in there).

The SRID = -1.  I know that.  I also know it's bad practice ;-).  I
thought I could bypass that information by uploading a point the
coordinates of which are close to another in the table so I figured I
did not need to know the SRID to upload it.  I see now that the geometry
is build by the coordinated and srid so the srid in the cfg file must be
the right one.  I found it through a colleague that knows the data ...

At any rate, the only way I succeeded in uploading a point was by
dropping the constraint I had on the srid in the table.  With the
constraint in the database, it seems impossible to upload a point with
its coordinates.  I'm on PG 8.2 and FS runs on the wsgi standalone
server if that has an incidence.

Another issue is char encoding.  Most of our tables are iso-8859-1 so I
modified postGIS.py to accept a char encoding from the cfg file.  cgf
parameter is "encoding".  I'll send it to you at your personal email
address.  

> 
> 
>         - we found it nice to be able to point to a PostGIS view that
>         has a
>         geometry
> 
> Yes, it is nice.  But  you can't [easily] update data directly to a
> view - so its really only good for looking at existing data unless you
> build some triggers. 

Right.  We were thinking more in terms of displaying complex info and I
know some folks here are pretty hot with triggers.  We'll see how that
works.

>         - we did not find how to specify rang of values
>         like .../?somefield=[a,b]; is it possible ?
> 
> 
> you can do less than/greater than type queries with postgis backend
> (eg &queryable=fieldname&fieldname__gte=5&fieldname_lte=8) 

I verified that I cannot do __gte and __lte at the same time.  It's one
or the other.

> 
> The action types currently supported for the postgis are  {'lt': '<',
> 'gt': '>',  'ilike': 'ilike', 'like':'like', 'gte': '>=', 'lte': '<='}

Yes I saw that in the code so we tried a couple of syntaxes.  We did not
think about the "__" notation.  I know it's everywhere in Python so I'll
go find out more about that.

The only thing left now for me is to update an existing record.  Is that
done with a curl command too ?  And of course the constraint on rid
remains an issue.

Thanx !

Yves
> 




More information about the Featureserver mailing list