Hi all,
here
is the table def:
db.define_table('geom',
Field('loc','geometry()'))
I gave up on this :
I
need to convert a Point(longitude,latitude) from srid 4326 to srid
2154 before insertion into the geometry field (or keep 2 versions of
the same point one in each spatial system)
this does the
conversion:
def trs():
q = "SELECT
ST_AsText(ST_Transform(ST_GeomFromText('POINT(5.
43.1)',4326),2154));"
pt =
db.executesql(q)
return locals()
but this brings up an error:
def tru():
query ="INSERT INTO geom(loc) VALUES
(ST_GeomFromText(ST_AsText(ST_Transform(ST_GeomFromText('POINT(5.
43.1)',4326),2154)),2154));"
result =
db.executesql(query)
return
locals()
127.0.0.1.2016-01-06.23-03-36.6324202b-9fab-47da-8e52-f1bab32d87e3
| web2py™ | Version 2.12.3-stable+timestamp.2015.08.19.00.18.03 |
|---|
1. | Traceback (most recent call last): |
As I understand it web2py geometry field uses SRID 4326 by default. Is there a way to tell it to use another SRID ?
db.define_table('geom',
Field('loc','geometry(public, 2154, 2)'))
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to a topic in the Google Groups "web2py-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/web2py/Ad7ICaNy5Dk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to web2py+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.