silke: thuban/Extensions/ogr ogrshapes.py,1.1,1.2

cvs@intevation.de cvs at intevation.de
Wed Dec 8 18:37:32 CET 2004


Author: silke

Update of /thubanrepository/thuban/Extensions/ogr
In directory doto:/tmp/cvs-serv27511/Extensions/ogr

Modified Files:
	ogrshapes.py 
Log Message:
Substituted ogr-method CloseRings because it is not available in all versions of ogr

Index: ogrshapes.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/ogr/ogrshapes.py,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- ogrshapes.py	7 Dec 2004 16:44:51 -0000	1.1
+++ ogrshapes.py	8 Dec 2004 17:37:30 -0000	1.2
@@ -176,9 +176,8 @@
         left, bottom, right, top = bbox
 
 	# create a geometry which can be passed to the layer as spatial filter
-	bboxpolygon = ogr.CreateGeometryFromWkt('Polygon((%s %s, %s %s, %s %s, %s %s))'
-		%(left, bottom, left, top, right, top, right, bottom))
-	bboxpolygon.CloseRings()
+	bboxpolygon = ogr.CreateGeometryFromWkt('Polygon((%s %s, %s %s, %s %s, %s %s, %s %s))'
+		%(left, bottom, left, top, right, top, right, bottom, left, bottom))
 
 	if ogrlayer.GetSpatialRef():
 		bboxpolygon.AssignSpatialReference(ogrlayer.GetSpatialRef())





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)