#NEWLINE# def test_srid( self ) : #NEWLINE# #INDENT# 'Testing the SRID property and keyword.' #NEWLINE# pnt = Point ( 5 , 23 , srid = 4326 ) #NEWLINE# self . assertEqual ( 4326 , pnt . srid ) #NEWLINE# pnt . srid = 3084 #NEWLINE# self . assertEqual ( 3084 , pnt . srid ) #NEWLINE# self . assertRaises ( ctypes . ArgumentError , pnt . set_srid , '4326' ) #NEWLINE# poly = fromstr ( self . geometries . polygons [ 1 ] . wkt , srid = 4269 ) #NEWLINE# self . assertEqual ( 4269 , poly . srid ) #NEWLINE# for ring in poly : #NEWLINE# #INDENT# self . assertEqual ( 4269 , ring . srid ) #NEWLINE# #UNINDENT# poly . srid = 4326 #NEWLINE# self . assertEqual ( 4326 , poly . shell . srid ) #NEWLINE# gc = GeometryCollection ( Point ( 5 , 23 ) , LineString ( ( 0 , 0 ) , ( 1.5 , 1.5 ) , ( 3 , 3 ) ) , srid = 32021 ) #NEWLINE# self . assertEqual ( 32021 , gc . srid ) #NEWLINE# for i in range ( len ( gc ) ) : #NEWLINE# #INDENT# self . assertEqual ( 32021 , gc [ i ] . srid ) #NEWLINE# #UNINDENT# hex = '0101000020E610000000000000000014400000000000003740' #NEWLINE# p1 = fromstr ( hex ) #NEWLINE# self . assertEqual ( 4326 , p1 . srid ) #NEWLINE# exp_srid = self . null_srid #NEWLINE# p2 = fromstr ( p1 . hex ) #NEWLINE# self . assertEqual ( exp_srid , p2 . srid ) #NEWLINE# p3 = fromstr ( p1 . hex , srid = ( - 1 ) ) #NEWLINE# self . assertEqual ( ( - 1 ) , p3 . srid )