[mapserver-commits] r11044 - trunk/msautotest/mspython
svn at osgeo.org
svn at osgeo.org
Thu Mar 3 14:11:37 EST 2011
Author: warmerdam
Date: 2011-03-03 11:11:37 -0800 (Thu, 03 Mar 2011)
New Revision: 11044
Modified:
trunk/msautotest/mspython/ogr_query.py
Log:
updated re: rfc65 on 6.0 query changes
Modified: trunk/msautotest/mspython/ogr_query.py
===================================================================
--- trunk/msautotest/mspython/ogr_query.py 2011-03-03 15:19:35 UTC (rev 11043)
+++ trunk/msautotest/mspython/ogr_query.py 2011-03-03 19:11:37 UTC (rev 11044)
@@ -49,7 +49,7 @@
print '(%d,%d)' % (result.shapeindex, result.tileindex)
- s = layer.getFeature( result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
for i in range(layer.numitems):
print '%s: %s' % (layer.getItem(i), s.getValue(i))
@@ -97,7 +97,8 @@
result = layer.getResult( i )
if result is None:
break
-
+
+ s = layer.getShape( result )
count = count + 1
if count != 2:
@@ -110,8 +111,7 @@
result = layer.getResult( 0 )
- s = mapscript.shapeObj( mapscript.MS_SHAPE_POLYGON )
- layer.resultsGetShape( s, result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
if pmstestlib.check_items( layer, s,
[('EAS_ID',' 158')] ) == 0:
@@ -133,7 +133,7 @@
except:
l = s.get( 0 )
if l.numpoints != 61:
- pmstestlib.post_reason( 'raster query has %d points, instead of expected number.' % l.numpoints )
+ pmstestlib.post_reason( 'query has %d points, instead of expected number.' % l.numpoints )
return 'fail'
try:
@@ -151,7 +151,7 @@
result = layer.getResult( 1 )
- layer.resultsGetShape( s, result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
if pmstestlib.check_items( layer, s,
[('EAS_ID',' 165')] ) == 0:
@@ -204,8 +204,7 @@
result = layer.getResult( 0 )
- s = mapscript.shapeObj( mapscript.MS_SHAPE_POLYGON )
- layer.resultsGetShape( s, result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
if pmstestlib.check_items( layer, s,
[('EAS_ID',' 158')] ) == 0:
@@ -227,7 +226,7 @@
except:
l = s.get( 0 )
if l.numpoints != 61:
- pmstestlib.post_reason( 'raster query has %d points, instead of expected number.' % l.numpoints )
+ pmstestlib.post_reason( 'query has %d points, instead of expected number.' % l.numpoints )
return 'fail'
try:
@@ -245,7 +244,7 @@
result = layer.getResult( 1 )
- layer.resultsGetShape( s, result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
if pmstestlib.check_items( layer, s,
[('EAS_ID',' 165')] ) == 0:
@@ -259,8 +258,14 @@
###############################################################################
# Confirm that we can still fetch features not in the result set directly
# by their feature id.
+#
+# NOTE: the ability to fetch features without going through the query API
+# seems to be gone in 6.0!
def ogr_query_6():
+
+ return 'skip'
+
layer = pmstestlib.layer
layer.open()
@@ -314,8 +319,7 @@
result = layer.getResult( 0 )
- s = mapscript.shapeObj( mapscript.MS_SHAPE_POLYGON )
- layer.resultsGetShape( s, result.shapeindex, result.tileindex )
+ s = layer.getShape( result )
if pmstestlib.check_items( layer, s,
[('EAS_ID',' 168')] ) == 0:
More information about the mapserver-commits
mailing list