#5440: GEOSGeometry: Add WKB support
-----------------------+----------------------------------------------------
Reporter:  rcoup       |       Owner:  nobody
  Status:  new         |   Component:  GIS   
 Version:  SVN         |    Keywords:  sprint
   Stage:  Unreviewed  |   Has_patch:  1     
-----------------------+----------------------------------------------------
 Attached is a patch that adds WKB support to the GEOSGeometry object,
 which we can use for more efficient conversions/access.
 
 Create a GEOSGeometry by passing the binary data as a buffer type (via
 `buffer()`):
 {{{
 # wkb =
 
buffer('\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?')
 # geom = GEOSGeometry(wkb)
 # geom.wkt
 'POINT (0.0000000000000000 1.0000000000000000)'
 }}}
 
 Get the WKB out:
 {{{
 # geom = Point(0, 1)
 # geom.wkb
 <read-only buffer for 0x2b10ff1c2030, size -1, offset 0 at 0x2b10ff1a6d18>
 # str(geom.wkb)
 
'\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xf0?'
 }}}
 
 In addition to tests for WKB, I've added a number of extra tests around
 geometry creation from formats other than WKT.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/5440>
Django Code <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to