I am converting code from MapWindow 4 that overlays a set of layers (grids and shapefiles).
In MW4, there is a function called MapWinGIS.Shapefile.PointInShapefile that can fairly quickly return the index of the shape in a polygon shapefile that contains a given point. There does not seem to be an equivalent function in DotSpatial, so we have written
a function that loops through each Feature in a FeatureSet and uses the .BasicGeometry function on each Feature, then uses .Intersects on the BasicGeometry to figure out which feature intersects the point. This probably works correctly, but it is taking hours
to run so I am looking for a faster way.
A fast version of this function would be a straightforward way to go. Another option would be to make a raster version of the shapefile that lines up exactly with the grid layer we are comparing to. From there, overlay would be easy and fast.
I have found DotSpatial.Analysis.VectorToRaster, but it uses GDI+ and that imposes limitations and I have also not gotten it to produce a raster containing anything other than all zero.
Has anyone used DotSpatial to do either of these things?