Пример #1
0
 /// <summary>
 /// Returns the current change.
 /// </summary>
 /// <returns></returns>
 private osmChange GetCurrentChange()
 {
     if (_current_changes == null)
     {
         _current_changes = new osmChange();
     }
     return(_current_changes);
 }
Пример #2
0
        private ChangeSet Convertv6XmlChanges(osmChange osm_change)
        {
            List <Change> changeList = new List <Change>();

            if (osm_change.create != null)
            {
                for (int index1 = 0; index1 < osm_change.create.Length; ++index1)
                {
                    create        create     = osm_change.create[index1];
                    List <OsmGeo> osmGeoList = new List <OsmGeo>();
                    if (create.node != null)
                    {
                        for (int index2 = 0; index2 < create.node.Length; ++index2)
                        {
                            osmGeoList.Add((OsmGeo)this.Convertv6XmlNode(create.node[index2]));
                        }
                    }
                    if (create.way != null)
                    {
                        for (int index2 = 0; index2 < create.way.Length; ++index2)
                        {
                            osmGeoList.Add((OsmGeo)this.Convertv6XmlWay(create.way[index2]));
                        }
                    }
                    if (create.relation != null)
                    {
                        for (int index2 = 0; index2 < create.relation.Length; ++index2)
                        {
                            osmGeoList.Add((OsmGeo)this.Convertv6XmlRelation(create.relation[index2]));
                        }
                    }
                    if (osmGeoList.Count > 0)
                    {
                        changeList.Add(new Change()
                        {
                            OsmGeo = osmGeoList,
                            Type   = ChangeType.Create
                        });
                    }
                }
            }
            return(new ChangeSet()
            {
                Changes = changeList
            });
        }