Search in sources :

Example 61 with LatLon

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

the class SphericalEarthMathTest method checkTranslate.

private void checkTranslate(int distance, int angle) {
    LatLon one = new OsmLatLon(53.5712482, 9.9782365);
    checkTranslate(one, distance, angle);
}
Also used : LatLon(de.westnordost.osmapi.map.data.LatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Example 62 with LatLon

use of de.westnordost.osmapi.map.data.LatLon 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 63 with LatLon

use of de.westnordost.osmapi.map.data.LatLon 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

LatLon (de.westnordost.osmapi.map.data.LatLon)63 OsmLatLon (de.westnordost.osmapi.map.data.OsmLatLon)45 ArrayList (java.util.ArrayList)29 BoundingBox (de.westnordost.osmapi.map.data.BoundingBox)13 List (java.util.List)12 ElementGeometry (de.westnordost.streetcomplete.data.osm.ElementGeometry)8 OsmNode (de.westnordost.osmapi.map.data.OsmNode)5 HashMap (java.util.HashMap)5 Point (android.graphics.Point)3 PointF (android.graphics.PointF)3 Node (de.westnordost.osmapi.map.data.Node)3 OsmElementQuestType (de.westnordost.streetcomplete.data.osm.OsmElementQuestType)3 LngLat (com.mapzen.tangram.LngLat)2 Point (com.vividsolutions.jts.geom.Point)2 Element (de.westnordost.osmapi.map.data.Element)2 QuestGroup (de.westnordost.streetcomplete.data.QuestGroup)2 VisibleQuestListener (de.westnordost.streetcomplete.data.VisibleQuestListener)2 OsmNoteQuestType (de.westnordost.streetcomplete.data.osmnotes.OsmNoteQuestType)2 Collection (java.util.Collection)2 Map (java.util.Map)2