Trying to get hand-drawn polygon delimiter for spatial query via OpenLayers to mapserver (then postgis). I can get the WKT of the drawn polygon and can substitute the dynamic values, but am having trouble getting the spatial query properly formatted.
Filter defined in OpenLayers:
myfilter = new OpenLayers.Filter.Logical({
type: OpenLayers.Filter.Logical.AND,
filters: [ new OpenLayers.Filter.Spatial({
type: OpenLayers.Filter.Spatial.INTERSECTS,
property: "footprint",
value: curr_wkt
}),
new OpenLayers.Filter.Comparison({
type: OpenLayers.Filter.Comparison.EQUAL_TO,
property: "roll",
value: roll
})
]
});
What myfilter looks like after created:
(INTERSECTS(footprint, '(POLYGON((-161.6625 71.073751831055,-167.625 69.498751831055,-168.3 65.673751831055,
-166.275 61.848751831055,-157.6125 64.773751831055,-161.6625 71.073751831055))')) AND (roll = '4')
But in the POST output from Firebug when run, the filter gets converted to an undefined Box (or Envelope if using 1.1.0):
POST result -
footprint undefined undefined undefined undefined roll 4
Is the WKT the wrong input format to use? Why does it change it to Box?