#21273: Add read only support for Oracle XE to django.contrib.gis
--------------------------------------+------------------------------------
Reporter: vinhussey | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: GIS | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 1
Needs tests: 1 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by vinhussey):
Attached 2 files:
* Sample data
* Updated code (version 4)
To test this file:
{{{
import sys
from oracle_xe_geom.models import Sdo_Test
from oracle_xe_geom.test_oracle_xe_class import sdo_geometry
def main(argv=None):
if argv is None:
argv = sys.argv
usage = "usage: %prog [options] arg"
data = []
geoms = []
sd = Sdo_Test.objects.all()
for s in sd:
data.append(s)
g = sdo_geometry(s.geom)
geoms.append(g)
print s.id, g.wkt
print data
if __name__ == "__main__":
sys.exit(main())
main()
}}}
Result:
{{{
1 POINT(200000.000000000000 200000.000000000000)
2 LINESTRING(200000.000000000000 200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000 220000.000000000000)
0 [1.0, 1003.0, 1.0]
3 POLYGON((200000.000000000000 200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000,200000.000000000000 200000.000000000000))
0 [1.0, 1003.0, 1.0]
1 [11.0, 2003.0, 1.0]
4 POLYGON((200000.000000000000 200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000,200000.000000000000
200000.000000000000)(202000.000000000000
202000.000000000000,208000.000000000000
208000.000000000000,208000.000000000000
202000.000000000000,202000.000000000000 202000.000000000000))
5 MULTIPOINT(200000.000000000000 200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000 220000.000000000000)
0 [1.0, 2.0, 1.0]
1 [9.0, 2.0, 1.0]
6 MULTILINESTRING((200000.000000000000
200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000)(202000.000000000000
202000.000000000000,208000.000000000000
208000.000000000000,208000.000000000000 202000.000000000000))
0 [1.0, 1003.0, 1.0]
7 MULTIPOLYGON(((200000.000000000000
200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000,200000.000000000000 200000.000000000000)))
0 [1.0, 1003.0, 1.0]
1 [11.0, 2.0, 1.0]
2 [17.0, 1.0, 1.0]
[[1003], 2, 1] [['200000.000000000000
200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000,200000.000000000000 200000.000000000000'],
'200000.000000000000 200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000 220000.000000000000',
'210000.000000000000 210000.000000000000']
8 GEOMETRY(POLYGON((200000.000000000000
200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000,200000.000000000000
220000.000000000000,200000.000000000000
200000.000000000000)),LINESTRING(200000.000000000000
200000.000000000000,220000.000000000000
200000.000000000000,220000.000000000000
220000.000000000000),POINT(210000.000000000000 210000.000000000000))
9 POLYGON(([[200000.0, 200000.0], [200000.0, 200000.0], [200000.0,
200000.0], [200000.0, 200000.0], [200000.0, 200000.0]]))
10 POLYGON(([[200000.0, 200000.0], [220000.0, 200000.0], [220000.0,
220000.0]]))
[<Sdo_Test: point>, <Sdo_Test: linestring>, <Sdo_Test: polygon>,
<Sdo_Test: polygon with inner ring>, <Sdo_Test: multi point>, <Sdo_Test:
multi line>, <Sdo_Test: multi polygon with 1 ring>, <Sdo_Test: geometry
collection - polygon and point>, <Sdo_Test: rectangle - 2 points>,
<Sdo_Test: circle - 3 points>]
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21273#comment:7>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" 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].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/067.28eacfa47c0ba54f6d19bbe2ee3d9058%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.