QueryByRect Problems on shp point

Francesco Sozzi fsozzi at INTERCAD.CH
Mon Jan 17 05:55:02 EST 2005


Hi all,

I am having problems on querying a shapfile layer of type point.

The code I use is:
$qresult = $layer->queryByRect($rectDrawnedMapCoord);
where $rectDrawnedMapCoord is a rectangle with map coordinates that contains
several points.

The problem is that I get an empty result.

Here you are some notes:
- I have problems only on shapefile layers of type point; queryByRect works
properly on shapefile polygon and line
- I an Oracle Spatial copy (exatly the same point objects and data) an it
works: I get right resul on queryByRect

Anybody have any suggestions?

Best regards

Francesco

PS: Here you are an extract of mapfile:

# ------------------------------------------------------------------------
# ic_manufatti (ORACLE LAYER: IT WORKS!!)
# ------------------------------------------------------------------------
LAYER
 NAME "ic_manufatti"
 TYPE POINT
 CONNECTIONTYPE oraclespatial
 CONNECTION "ti_manufatti/avs at franz"
 DATA "GEOM FROM (SELECT fid, dist, geom FROM ic_kuba_manufatti WHERE geom
IS NOT NULL) USING UNIQUE fid"
 STATUS OFF
 METADATA
  ic.layer.key  "FID"
  ic.layer.key.type "numeric"
  ic.form.key   "FID"
 END

 CLASS
  NAME "Default"
  COLOR 0 0 0
  SYMBOL "circle"
  SIZE 10
  TEMPLATE "templates/default.html"
 END
END

# ------------------------------------------------------------------------
# ic_manufattishp (SHAPEFILE LAYER: IT  DOES NOT WORK!!)
# ------------------------------------------------------------------------
LAYER
 NAME "ic_manufattishp"
 TYPE POINT
 DATA "manufattishp"
 STATUS DEFAULT
 METADATA
  ic.layer.key  "NUMERO"
  ic.layer.key.type "string"
  ic.form.key   "NUMERO"
 END

 CLASS
  NAME "Default"
  COLOR 125 0 0
  SYMBOL "circle"
  SIZE 10
  TEMPLATE "templates/default.html"
 END
END



More information about the mapserver-users mailing list