On Thu, Jul 27, 2017 at 6:37 PM, Tom Kralidis <
tom.kr...@gmail.com> wrote:
>
>
> On Thursday, July 27, 2017 at 11:49:58 AM UTC-4, erilem wrote:
>>
>> On Thu, Jul 27, 2017 at 2:05 PM, Tom Kralidis <
tom.kr...@gmail.com> wrote:
>> > Thanks Tobias. It would be great to have the same functionality as
>> > achieved
>> > by:
>> >
>> > create table testptz (pkey integer primary key, geom geometry);
>> > insert into testptz values (0, 'POINT(0 0 0)');
>> >
>> > Should I open a GitHub issue?
>>
>> Yep, but I'd like to undertand why "geom geometry(geometry, 0)" is not
>> the same as "geom geometry".
>>
>>
>> In the mean time you should be able to create your own Geometry type.
>> Something like this (untested):
>>
>> import geoalchemy2.types
>>
>> class Geometry(geoalchemy2.types.Geometry):
>> def get_col_spec(self):
>> if self.geometry_type == 'GEOMETRY' and self.srid == 0:
>> return
self.name
>> return '%s(%s,%d)' % (
self.name, self.geometry_type, self.srid)
>>
>>
>
> Thanks Eric. This doesn't work either/yields the same results. I've issued
> a ticket in
https://github.com/geoalchemy/geoalchemy2/issues/158
> but if there is a workaround that would be great.