[sqlalchemy] [SQLAlchemy-Continuum] sqlalchemy.exc.InvalidRequestError: Implicitly combining column(...) in joined table inheritance scenario

2015-09-06 Thread Piotr Dobrogost
Hi!

I've recently raised a bug on SQLAlchemy-Continuum's tracker 
at https://github.com/kvesteri/sqlalchemy-continuum/issues/105 regarding 
"Implicitly combining column(...)" error when trying to version tables used 
in joined table inheritance scenario.
As there's been very little activity on this project lately I thought I 
would post here hoping someone knows this extension and could shed some 
light on what might be the reason for the error. In the issue there's small 
test case and traceback.
Thank you in advance.

Regards,
Piotr Dobrogost

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.


[sqlalchemy] Re: Support for native PostgreSQL "polygon" type?

2015-09-06 Thread Demitri Muna
Hi Ian,

Thanks for the reply.

On Saturday, September 5, 2015 at 11:53:39 AM UTC-4, Ian McCullough wrote:
>
> Is there some compelling reason you wouldn't just install the PostGIS 
> extensions? Assuming there is...
>

There is; I can't use any of the functionality. My use case is astronomical 
data where all values are points on a sphere. I can't use the various 
projections that GIS provides. I investigated the possibility of using GIS 
tools for astronomical data a few years back, but found it wasn't really 
appropriate. I actually came across this which I found amusing:

http://lists.osgeo.org/pipermail/postgis-devel/2009-March/005184.html
 

> Actually, now that I think about it, since you won't be able to use them 
> in query expressions anyway, there's probably no reason to go to the extra 
> effort of hybrid properties; just make a pure python property to do the 
> conversion between the mapped TEXT|BLOB column and the Geometry types.
>

PostrgreSQL has a native "polygon" data type that I'd like to use:

http://www.postgresql.org/docs/current/static/datatype-geometric.html

There is a library that is specifically designed for astronomical data 
(which indexes points on a sphere):

https://github.com/segasai/q3c

and uses the polygon data type in this function:

q3c_poly_query(ra, dec, poly) -- returns true if ra, dec is within
  the postgresql polygon poly.


This is all I really need. I imagine my class will look something like this:

class Field(Base):
__tablename__ = 'field'
__table_args__ = {'autoload' : True}
polygon_column = ???

Where I can do:

f = Field()
f.polygon = ???

I just don't know what to put into the '???'s.

Thanks,
Demitri

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.