Hi,
I have uploaded an initial class to handle sdo_geometry.  It is a work in 
progress, but is generating WKT for POINT & POLYGON geometry.  It needs to 
be expanded and cleaned up.

See https://code.djangoproject.com/ticket/21273
Vincent

On Wednesday, October 16, 2013 5:02:01 PM UTC+1, [email protected] wrote:
>
> Hi,
> I have opened a ticket on a method that seems to work to provide read only 
> access to spatial (sdo_geometry) fields in an oracle database using oracle 
> xe. See https://code.djangoproject.com/ticket/21273
>
> In short, we can use the__getattribute__ method of the CLOB field returned 
> by cx_Oracle to access the SDO_GEOMETRY object and to generate WKT, like 
> this:
>
> >>> g_ewkt = "SRID:%s:POINT(%f %f)" % 
> >>> (str(int(g.__getattribute__('SDO_SRID'))), 
> >>> g.__getattribute__('SDO_POINT').X, g.__getattribute__('SDO_POINT').Y)
> >>> g_ewkt
> 'SRID:82086:POINT(162913.389524 340748.357977)'
>
> The Oracle documentation explains in detail how the object works, so 
> accessing a range of geometry types (if not all types) as wkt appears to be 
> feasible.
>
> I'd be grateful on pointers or assistance (or would be happy to help someone 
> who has more familiarity with django.contrib.gis) to move this on.
>
> I understand from comments on the wiki and in the docs that this may be of 
> use to a range of users, if only as a way to transfer legacy data to postgres 
> (which is my use case).
>
> Thanks
> Vincent 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a718cefa-64cc-4ffa-af28-9154287f7604%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to