private void Add_geom(int dimension, bool unioned, com.epl.geometry.Geometry geom) { com.epl.geometry.OperatorUnionCursor.Geom_pair pair = new com.epl.geometry.OperatorUnionCursor.Geom_pair(); pair.Init(); pair.geom = geom; int sz = Get_vertex_count_(geom); pair.vertex_count = sz; int level = Get_level_(sz); if (dimension + 1 > (int)m_union_bins.Count) { for (int i = 0, n = System.Math.Max(2, dimension + 1); i < n; i++) { m_union_bins.Add(new System.Collections.Generic.SortedDictionary <int, com.epl.geometry.OperatorUnionCursor.Bin_type>()); } } //com.epl.geometry.OperatorUnionCursor.Bin_type bin = m_union_bins[dimension][level]; //return null if level is abscent com.epl.geometry.OperatorUnionCursor.Bin_type bin; if (!m_union_bins[dimension].TryGetValue(level, out bin)) { bin = new com.epl.geometry.OperatorUnionCursor.Bin_type(); m_union_bins[dimension][level] = bin; } pair.unioned = unioned; bin.Add_pair(pair); // Update global cursor state m_dim_geom_counts[dimension]++; m_added_geoms++; m_max_dimension = System.Math.Max(m_max_dimension, dimension); }
//bin array and the total vertex count in the bin internal void Add_pair(com.epl.geometry.OperatorUnionCursor.Geom_pair geom) { bin_vertex_count += geom.vertex_count; geometries.Add(geom); }