Search in sources :

Example 6 with Node

use of de.westnordost.osmapi.map.data.Node in project StreetComplete by westnordost.

the class NodeDaoTest method testPutGetWithTags.

public void testPutGetWithTags() {
    Map<String, String> tags = new HashMap<>();
    tags.put("a key", "a value");
    LatLon pos = new OsmLatLon(2, 2);
    Node node = new OsmNode(5, 1, pos, tags);
    dao.put(node);
    Node dbNode = dao.get(5);
    checkEqual(node, dbNode);
}
Also used : LatLon(de.westnordost.osmapi.map.data.LatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) HashMap(java.util.HashMap) OsmNode(de.westnordost.osmapi.map.data.OsmNode) OsmNode(de.westnordost.osmapi.map.data.OsmNode) Node(de.westnordost.osmapi.map.data.Node) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Example 7 with Node

use of de.westnordost.osmapi.map.data.Node in project StreetComplete by westnordost.

the class NodeDaoTest method testPutGetNoTags.

public void testPutGetNoTags() {
    LatLon pos = new OsmLatLon(2, 2);
    Node node = new OsmNode(5, 1, pos, null);
    dao.put(node);
    Node dbNode = dao.get(5);
    checkEqual(node, dbNode);
}
Also used : LatLon(de.westnordost.osmapi.map.data.LatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) OsmNode(de.westnordost.osmapi.map.data.OsmNode) OsmNode(de.westnordost.osmapi.map.data.OsmNode) Node(de.westnordost.osmapi.map.data.Node) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Aggregations

Node (de.westnordost.osmapi.map.data.Node)7 OsmNode (de.westnordost.osmapi.map.data.OsmNode)4 Element (de.westnordost.osmapi.map.data.Element)3 LatLon (de.westnordost.osmapi.map.data.LatLon)3 OsmLatLon (de.westnordost.osmapi.map.data.OsmLatLon)3 Relation (de.westnordost.osmapi.map.data.Relation)2 Way (de.westnordost.osmapi.map.data.Way)2 ElementGeometry (de.westnordost.streetcomplete.data.osm.ElementGeometry)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1