This project has moved and is read-only. For the latest updates, please go here.

getfeatureinfo of current wms version

Topics: SharpMap Project
Oct 21, 2011 at 11:19 AM


I would like to suggest  to check the functionality "GetFeatureInfo" of the wmsserver


The same exact input data works perfectly on the version of some months ago

while with current versione i have no data back

in this piece of code(around ln 383

 ICanQueryLayer queryLayer = mapLayer as ICanQueryLayer;
                            if (queryLayer.IsQueryEnabled)
                                Single queryBoxMinX = x - (_pixelSensitivity);
                                Single queryBoxMinY = y - (_pixelSensitivity);
                                Single queryBoxMaxX = x + (_pixelSensitivity);
                                Single queryBoxMaxY = y + (_pixelSensitivity);
                                SharpMap.Geometries.Point minXY = map.ImageToWorld(new System.Drawing.PointF(queryBoxMinX, queryBoxMinY));
                                SharpMap.Geometries.Point maxXY = map.ImageToWorld(new System.Drawing.PointF(queryBoxMaxX, queryBoxMaxY));
                                BoundingBox queryBox = new BoundingBox(minXY, maxXY);
                                SharpMap.Data.FeatureDataSet fds = new SharpMap.Data.FeatureDataSet();
                                queryLayer.ExecuteIntersectionQuery(queryBox, fds);
                                if (_intersectDelegate != null)
                                    fds.Tables[0] = _intersectDelegate(fds.Tables[0], queryBox);

the tds.Tables is empty




when the code was


ICanQueryLayer queryLayer = mapLayer as ICanQueryLayer;
                            if (queryLayer.IsQueryEnabled)
                                SharpMap.Data.FeatureDataSet fds = new SharpMap.Data.FeatureDataSet();
                                queryLayer.ExecuteIntersectionQuery(p.GetBoundingBox(), fds);
                                if (fds.Tables.Count == 0)



the same input data gave me correct results

Oct 31, 2011 at 5:47 PM

did you supply a delegate function to WMSServer or not?

If you didn't or supplied null, it should work like before. If you did create a delegate function, please post it here as well

Oct 31, 2011 at 10:18 PM

i did not supplied any function

Nov 1, 2011 at 6:59 PM
Edited Nov 1, 2011 at 7:00 PM

strange, , because if there's no delegate, nothing will alter your results.

Can you put a breakpoint at line if (_intersectDelegate != null) and see what's inside fds before this line is executed?