[mapserver-users] Oracle Spatial and MAXFEATURES, not implemented?
Yewondwossen Assefa
yassefa at dmsolutions.ca
Fri May 7 07:03:31 PDT 2010
This was done as part of the http://trac.osgeo.org/mapserver/ticket/2605
and is only available in trunk right now (for the upcoming 6.0 release).
regards,
On 07/05/2010 9:45 AM, Peter Hopfgartner wrote:
> 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
>
>
>
>
>
--
----------------------------------------------------------------
Assefa Yewondwossen
Software Analyst
Email: yassefa at dmsolutions.ca
http://www.dmsolutions.ca/
Phone: (613) 565-5056 (ext 14)
Fax: (613) 565-0925
----------------------------------------------------------------
More information about the MapServer-users
mailing list