Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
live access to postgis database to use in ExtJS, OpenLayers, etc
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  9 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Gery Herbozo  
View profile  
 More options Oct 1 2012, 5:48 pm
From: Gery Herbozo <geryherb...@gmail.com>
Date: Mon, 1 Oct 2012 23:48:05 +0200
Local: Mon, Oct 1 2012 5:48 pm
Subject: live access to postgis database to use in ExtJS, OpenLayers, etc
One general question, is it possible to create a live access to a
postgis database using sqlalchemy? the idea is to search records in
several tables. thanks in advance, regards

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Bayer  
View profile  
 More options Oct 1 2012, 5:58 pm
From: Michael Bayer <mike...@zzzcomputing.com>
Date: Mon, 1 Oct 2012 17:57:50 -0400
Local: Mon, Oct 1 2012 5:57 pm
Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc
take a look at GeoAlchemy:

http://www.geoalchemy.org/

there's a new release upcoming for SQLAlchemy 0.8 that will be vastly improved.

On Oct 1, 2012, at 5:48 PM, Gery Herbozo wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gery .  
View profile  
 More options Oct 1 2012, 6:38 pm
From: "Gery ." <gameji...@hotmail.com>
Date: Mon, 1 Oct 2012 22:38:43 +0000
Local: Mon, Oct 1 2012 6:38 pm
Subject: RE: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

thanks but I want to use that live access to search at first through ExtJS/GeoExtJS/OpenLayers and through them there is only a url available (protocol HTTP), I also need to get the data as GeoJSON, so I think GeoAlchemy might not be the right solution, I think. If I'm wrong, please I'd love some points about it, thanks.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon King  
View profile  
 More options Oct 2 2012, 9:43 am
From: Simon King <si...@simonking.org.uk>
Date: Tue, 2 Oct 2012 14:43:21 +0100
Local: Tues, Oct 2 2012 9:43 am
Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

On Mon, Oct 1, 2012 at 11:38 PM, Gery . <gameji...@hotmail.com> wrote:

> thanks but I want to use that live access to search at first through
> ExtJS/GeoExtJS/OpenLayers and through them there is only a url available
> (protocol HTTP), I also need to get the data as GeoJSON, so I think
> GeoAlchemy might not be the right solution, I think. If I'm wrong, please
> I'd love some points about it, thanks.

It sounds like you are trying to do at least 6 quite complicated
things all at once, without really understanding any of them. This
will not be easy.

1. The client side of your application is presumably written in
Javascript and HTML, using javascript libraries such as ExtJS and
OpenLayers. You need to fully understand how these work.

2. The application will then make HTTP requests to a web server. You
need to understand at least the basics of HTTP.

3. The web server might be a single python script, or it could be
something running behind Apache. You need to understand your web
server.

4. The server side of your application might be using any of a number
of libraries to connect to the web server (such as
Django/Pyramid/Flask/cgi/mod_wsgi etc.). You need to understand
whatever mechanism your application is using to speak HTTP.

5. Your application can use SQLAlchemy and GeoAlchemy to retrieve data
from postgis into Python data structures. You will need to understand
postgis, SQLAlchemy, GeoAlchemy and Python.

6. Your application can then convert those Python data structures into
GeoJSON. You will need to understand GeoJSON.

The SQLAlchemy mailing list can help you with exactly one part of this
(step 5). SQLAlchemy (and GeoAlchemy) is perfectly capable of querying
multiple tables and retrieving results. But how you accept the HTTP
request, and how you pass the results back, are completely outside the
scope of this list and I'm afraid you are unlikely to find much help
here with it.

Sorry I can't be more help,

Simon


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gery .  
View profile  
 More options Oct 2 2012, 2:26 pm
From: "Gery ." <gameji...@hotmail.com>
Date: Tue, 2 Oct 2012 18:26:09 +0000
Local: Tues, Oct 2 2012 2:26 pm
Subject: RE: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

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.

___________________________________________________________________________ _______________
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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Bayer  
View profile  
 More options Oct 2 2012, 3:25 pm
From: Michael Bayer <mike...@zzzcomputing.com>
Date: Tue, 2 Oct 2012 15:25:29 -0400
Local: Tues, Oct 2 2012 3:25 pm
Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

On Oct 2, 2012, at 2:26 PM, Gery . 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.

If I'm reading this correctly, this is uncalled for - Simon is an incredibly helpful person, and on the SQLAlchemy list you'll get all the help you need in using SQLAlchemy and relational databases.   For general Python assistance you can try IRC channel #python, the comp.lang.python lists, and StackOverflow.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Simon King  
View profile  
 More options Oct 3 2012, 5:19 am
From: Simon King <si...@simonking.org.uk>
Date: Wed, 3 Oct 2012 10:18:47 +0100
Local: Wed, Oct 3 2012 5:18 am
Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

On Tue, Oct 2, 2012 at 7:26 PM, Gery . <gameji...@hotmail.com> 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 must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Gery .  
View profile  
 More options Oct 3 2012, 2:13 pm
From: "Gery ." <gameji...@hotmail.com>
Date: Wed, 3 Oct 2012 18:13:10 +0000
Local: Wed, Oct 3 2012 2:13 pm
Subject: RE: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc

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.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kent Tenney  
View profile  
 More options Oct 3 2012, 5:42 pm
From: Kent Tenney <kten...@gmail.com>
Date: Wed, 3 Oct 2012 16:42:15 -0500
Local: Wed, Oct 3 2012 5:42 pm
Subject: Re: [sqlalchemy] live access to postgis database to use in ExtJS, OpenLayers, etc
"It sounds like you are trying to do at least 6 quite complicated
things all at once, without really understanding any of them. This
will not be easy."

Sigh. The story of my life in one sentence.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »