Пример #1
0
 public override void FillRawEntry(RawEntry raw)
 {
     raw.id = id;
     raw.name = name;
     raw.value = String.Join(" ", nodes);
     raw.type = RawEntry.TYPE_WAY;
 }
Пример #2
0
 public override void FillRawEntry(RawEntry raw)
 {
     raw.id = id;
     raw.name = name;
     raw.value = lon.ToString() + " " + lat.ToString();
     raw.type = RawEntry.TYPE_NODE;
 }
Пример #3
0
 public Way(RawEntry raw)
 {
     id = raw.id;
     name = raw.name;
     var parts = raw.value.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
     nodes = new List<long>();
     foreach (var part in parts)
         nodes.Add(Int64.Parse(part));
 }
Пример #4
0
        public Node(RawEntry raw)
        {
            id = raw.id;
            name = raw.name;

            var parts = raw.value.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
            lon = float.Parse(parts[0]);
            lat = float.Parse(parts[1]);
        }
Пример #5
0
 public virtual void FillRawEntry(RawEntry raw)
 {
 }
Пример #6
0
 public void Upsert(Entry entry)
 {
     var raw = new RawEntry();
     entry.FillRawEntry(raw);
     _upsertCommand.Parameters["ID"].Value = raw.id;
     _upsertCommand.Parameters["TYPE"].Value = raw.type;
     _upsertCommand.Parameters["NAME"].Value = raw.name;
     _upsertCommand.Parameters["VALUE"].Value = raw.value;
     _upsertCommand.ExecuteNonQuery();
 }