Re: Code a web service with python/postgis

2014-05-21 Thread Burak Arslan

On 05/20/14 21:10, lcel...@latitude-geosystems.com wrote:
> Dear all,
>
> I would like code a web service with python. I have already imported
> several vector data
> (land cover) and one Digital Elevation Model (raster layer) into my
> postgresql/postgis
> database (server side).
>
> I succeed in connecting to my pg db via psycopg2.
>
> Client side, operators use a client application (Developed with PHP /
> javascript /
> openlayers).
>
> Objectives :  Client side, once the layer would be selected,and once
> the operators have
> clicked on the map  , they would like that usefull informations appear
> on the interface
> of the client application(kind of land cover, z of the DEM).
>
>
> => Regarding my python script, i have to type a SQL query in order to
> select usefull
> informations of the db layers. And, of course, the information must 
> depend on geographic
> coordinates (Latitude Y/Longitute X).
> In a 2nd time, my script must  produce a result(JSon type) for the
> client side.


Hi,

Spyne supports Point, Line, Polygon and their Multi* variants. e.g.:
http://spyne.io/docs/2.10/reference/model/primitive.html#spyne.model.primitive.Line

This means it can validate WKT input and produce WKT output.

It also includes SQLAlchemy adapters for these types. This means you
don't need to use  GeoAlchemy if you have Spyne.

Finally, Spyne can return your data in Soap, Xml, Json, Yaml, MsgPack,
html table, html microformat, etc. etc. or you can implement your
protocols if you don't like the ones already provided.

Spyne web site: http://spyne.io
If you have further questions you can use Spyne tag in stackoverflow or
http://lists.spyne.io/listinfo/people

Disclaimer: I'm the author of Spyne. I already have GIS projects based
on Spyne in production.

Best regards,
Burak

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Code a web service with python/postgis

2014-05-20 Thread dieter
lcel...@latitude-geosystems.com writes:
> ...
> I would like code a web service with python.
> ... details omitted ...

Such a task has many facets. Some of them are quite general
and you can find packages on "PyPI" which support them well;
others are highly problem specific and you likely will need
to solve them on your own.

"web service" is an ambigous term: in a wide meaning, it can
be any service provided via HTTP/HTTPS; however, often,
it is used in a narrow way as a SOAP/WSDL service.
There are several packages which help you to implement SOAP services
in Python, among them "spyne" and "soapbox". This gives
you the SOAP aspect (together with WSDL generation).

In addition, you have the "web" aspect. There are other
packages for this: among them "django", "pyramid", "twisted", ...

And there are further more application dependent aspects
like determining the geo location. Look at "PyPI" to find
out whether there are packages that help you with those.
Likely, those will not be pure Python packages but bridges to
other ("C/C++") libraries.



-- 
https://mail.python.org/mailman/listinfo/python-list


Code a web service with python/postgis

2014-05-20 Thread lcelati

Dear all,

I would like code a web service with python. I have already imported  
several vector data
(land cover) and one Digital Elevation Model (raster layer) into my  
postgresql/postgis

database (server side).

I succeed in connecting to my pg db via psycopg2.

Client side, operators use a client application (Developed with PHP /  
javascript /

openlayers).

Objectives :  Client side, once the layer would be selected,and once  
the operators have
clicked on the map  , they would like that usefull informations appear  
on the interface

of the client application(kind of land cover, z of the DEM).


=> Regarding my python script, i have to type a SQL query in order to  
select usefull
informations of the db layers. And, of course, the information must   
depend on geographic

coordinates (Latitude Y/Longitute X).
In a 2nd time, my script must  produce a result(JSon type) for the  
client side.



It would be possible to help me regarding the coding in order to  
select usefull
informations of the db layers. (depends on geographic coordinates x/y   
? Could you throw

light for me regarding the way to do this SQL query ?

In advance, thank you to throw light for me.
--
https://mail.python.org/mailman/listinfo/python-list


Code a web service with python/postgis

2014-05-20 Thread image
Dear all,

I would like code a web service with python. I have already imported several
vector data 
(land cover) and one Digital Elevation Model (raster layer) into my
postgresql/postgis 
database (server side).

I succeed in connecting to my pg db via psycopg2.

Client side, operators use a client application (Developed with PHP /
javascript / 
openlayers).

Objectives :  Client side, once the layer would be selected,and once the
operators have 
clicked on the map  , they would like that usefull informations appear on
the interface 
of the client application(kind of land cover, z of the DEM).


=> Regarding my python script, i have to type a SQL query in order to select
usefull 
informations of the db layers. And, of course, the information must  depend
on geographic 
coordinates (Latitude Y/Longitute X).
In a 2nd time, my script must  produce a result(JSon type) for the client
side.


It would be possible to help me regarding the coding in order to select
usefull 
informations of the db layers. (depends on geographic coordinates x/y  ?
Could you throw 
light for me regarding the way to do this SQL query ?

In advance, thank you to throw light for me.



--
View this message in context: 
http://python.6.x6.nabble.com/Code-a-web-service-with-python-postgis-tp5057714.html
Sent from the Python - python-list mailing list archive at Nabble.com.
-- 
https://mail.python.org/mailman/listinfo/python-list