public override void FillRawEntry(RawEntry raw) { raw.id = id; raw.name = name; raw.value = String.Join(" ", nodes); raw.type = RawEntry.TYPE_WAY; }
public override void FillRawEntry(RawEntry raw) { raw.id = id; raw.name = name; raw.value = lon.ToString() + " " + lat.ToString(); raw.type = RawEntry.TYPE_NODE; }
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)); }
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]); }
public virtual void FillRawEntry(RawEntry raw) { }
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(); }