[mapserver-users] Oracle Spatial and MAXFEATURES, not implemented?
Peter Hopfgartner
peter.hopfgartner at r3-gis.com
Fri May 7 06:45:18 PDT 2010
I'm trying to limit the maximum number of features, as in the map file
snippet below.
MapServer is 5.6.3.
Anyway, the number of features drawn is not limited, as expected, but
thousands of shapes are processed.
Indeed, enabling -all_debug 5, the query passed to Oracle looks like;
---
msOracleSpatialLayerWhichShapes. Using this Sql to retrieve the data:
SELECT pln_id, pln_id, the_geom FROM plant_data_map WHERE
SDO_FILTER( the_geom, MDSYS.SDO_GEOMETRY(2003, :srid,
NULL,MDSYS.SDO_ELEM_INFO_ARRAY(1,1003,3),:ordinates ),'querytype=window') = 'TRUE'
msOracleSpatialLayerWhichShapes. Bind values: srid:25832
minx:666798.076923 miny:5169400.000000 maxx:667551.923077
maxy:5170000.000000
---
Indeed, almost 15,000 shapes arrive:
---
msOracleSpatialLayerNextShape on layer 0x101363e0, row_num: 14934
msOracleSpatialLayerNextShape on layer 0x101363e0, Fetched 0 more rows
(14934 total)
msOracleSpatialLayerFreeItemInfo was called.
---
Peeking at the source in maporaclespatial.c, it seems that
layer->maxfeatures is never read and no limitation, maybe looking like
"ROWNUM <= layer->maxfeatures" is added to the SELECT statement.
Regards,
Peter
MAPFILE SNIPPET:
LAYER #----------------16-----------------
GROUP "pflanzennr_black_12"
NAME "Pflanzennr"
STATUS ON
TYPE POINT
PROJECTION
"init=epsg:25832"
END
CONNECTIONTYPE oraclespatial
CONNECTION "{MYUSER}/{MYPASSWD}"
DATA "the_geom from plant_data_map using unique pln_id srid
25832"
PROCESSING "CLOSE_CONNECTION=DEFER"
SIZEUNITS meters
LABELITEM "pln_id"
MAXFEATURES 20
TOLERANCE 1
POSTLABELCACHE TRUE
CLASS
NAME "label"
LABEL
TYPE TRUETYPE
PARTIALS TRUE
FONT "verdana"
COLOR 0 0 0
OUTLINECOLOR 255 255 255
SIZE 6
MINSIZE 6
MAXSIZE 8
POSITION CR
FORCE TRUE
END
END
END
--
Dott. Peter Hopfgartner
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
Email: peter.hopfgartner at r3-gis.com
Tel. : +39 0473 494949
Fax : +39 0473 069902
www : http://www.r3-gis.com
XING : http://www.xing.com/go/invita/8917535
More information about the MapServer-users
mailing list