Joska wrote:
S.th like this
Hahaha ofcourse but i was thinking that maybe it could be a part of the current code since your code is to find addresses within so i was think that maybe a simple ifnot statement somewhere would suffice :) I will try union, thanxIf you keep track of the feature ids of features, that are actually inside any polygon, you could iterate over the whole featureset, skipping those with tracked ids.
S.th like this
// ...var trackedFids = new System.Collections.Generic.List<int>(); var candidates = sishp.QueryFeatures(new DotSpatial.Data.Extent(geom.Envelope)); foreach (var candidate in candidates) { if (geom.Contains(DotSpatial.Topology.Geometry.FromBasicGeometry(candidate.BasicGeometry))) { trackedFids.Add(candiate.Fid); // do sth with candidate } } /* * A couple of lines later.... */ trackedFids.Sort(); int found = 0 foreach(var candidate in shp....Features) { if (found < trackedFids.Count && trackedFids[found] == candiate.Fid) { while (trackedFids[found] == candiate.Fid) //plus! found = found + 1; continue; } // Do sth with candidate }