thanks a lot for the answer, I didn't expect that, nice from you. I'll take a look at that and see what I keep doing, in fact I have set all the backend and client part, the only thing I need is to "leave the door open" to my pg tables, so I can (at first) search inside them and plot the features in OL. Through the postgis_geojson.php script and extjs I'm trying that because it allows what I need, it's just to find a way to pass the two variables I need and overwrite the default ext-comp104 of the xtype. But yes, this is beyond the scope of this forum. BTW my question (live access to postgis database) was related to what the MapFish guys did in the MapFish demo (great project btw, these guys are geniuses), they just use "an url" to do the search function, I know there is "bunch of things" behind (Pylons, etc), but I just wanted to know if it's possible to do it easier than that, perhaps with just SqlAlchemy, but I think a RESTful framework could work also.
Many thanks also Michael for your email, helpful as always. Cheers, Gery __________________________________________________________________________________________ Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es necesario. Think green - keep it on the screen. Do NOT print if it is NOT necessary. Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie NICHT, wenn es NICHT notwendig ist. > From: [email protected] > Date: Wed, 3 Oct 2012 10:18:47 +0100 > Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, > OpenLayers, etc > To: [email protected] > > On Tue, Oct 2, 2012 at 7:26 PM, Gery . <[email protected]> wrote: > > > > thanks for the email, it seems that you know a lot about this stuff, it'd be > > great if you could share what you know so in that way we will learn from > > you, but as expected you won't do it, your "Sorry I can't be more help," is > > very clear as always. But hey anyway, I appreciate that you demostrate how > > you really are. > > > > I was just trying to demonstrate that what you are trying to do is > complicated, with a lot of interactions between different > technologies. You need to break it down into smaller tasks that you > can test, and get each piece working before starting on the next. > > I recommend that you start by taking the example GeoJSON file from > http://www.geojson.org/geojson-spec.html#examples and saving that on > your web server. Change your javascript to load that file, and check > that you can actually see the data from the file in your application. > If you can't get this working you'll need to talk to someone who knows > about OpenLayers (I don't know anything about it) > > Once you've done that, put a python script in the cgi-bin directory of > your web server that looks something like this: > > ------------------------------ > #!/usr/bin/env python > # CGI scripts start by sending the HTTP headers. The only > # one you absolutely need is the Content-type header. > # I'm not sure if OpenLayers requires a specific content type > # so you may need to experiment here. > print "Content-type: application/json" > > # In HTTP, a blank line separates the headers from the body > # of the response > print "" > > # Anything else that you print forms the body of the response. > # In this case, we just want to send the example GeoJSON data. > print """ > <include the example GeoJSON file here> > """ > ------------------------------ > > Visit http://localhost/cgi-bin/yourscript.py in your web browser and > verify that you see the GeoJSON data. If that doesn't work, you'll > probably need to contact the Python mailing list. > > Update your Javascript to point to that URL. You should still be able > to see the data within your application. > > Once you've got all that working, you can start adding SQLAlchemy into > the python script. Let us know when you get there and we might be able > to help. > > Simon > > -- > You received this message because you are subscribed to the Google Groups > "sqlalchemy" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/sqlalchemy?hl=en. > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.
