Search in sources :

Example 46 with OsmLatLon

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

the class CreateNoteUploadTest method createACreateNote.

private CreateNote createACreateNote() {
    CreateNote n = new CreateNote();
    n.id = 1;
    n.text = "jo ho";
    n.position = new OsmLatLon(1.0, 2.0);
    return n;
}
Also used : OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Example 47 with OsmLatLon

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

the class OsmNoteQuestChangesUploadTest method createQuest.

private static OsmNoteQuest createQuest() {
    Note note = new Note();
    note.id = 1;
    note.position = new OsmLatLon(1.0, 2.0);
    OsmNoteQuest quest = new OsmNoteQuest(note, new OsmNoteQuestType());
    quest.setId(3);
    quest.setStatus(QuestStatus.NEW);
    quest.setComment("blablub");
    return quest;
}
Also used : Note(de.westnordost.osmapi.notes.Note) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Example 48 with OsmLatLon

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

the class OsmNotesDownloadTest method createANote.

private Note createANote() {
    Note note = new Note();
    note.id = 4;
    note.position = new OsmLatLon(6.0, 7.0);
    note.status = Note.Status.OPEN;
    note.dateCreated = new Date();
    NoteComment comment = new NoteComment();
    comment.date = new Date();
    comment.action = NoteComment.Action.OPENED;
    comment.text = "hurp durp";
    note.comments.add(comment);
    return note;
}
Also used : NoteComment(de.westnordost.osmapi.notes.NoteComment) Note(de.westnordost.osmapi.notes.Note) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) Date(java.util.Date)

Example 49 with OsmLatLon

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

the class TangramConstTest method testConvertSingle.

public void testConvertSingle() {
    double lng = 10;
    double lat = 5;
    OsmLatLon pos = new OsmLatLon(lat, lng);
    LatLon pos2 = TangramConst.toLatLon(TangramConst.toLngLat(pos));
    assertEquals(pos, pos2);
}
Also used : LatLon(de.westnordost.osmapi.map.data.LatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Example 50 with OsmLatLon

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

the class TangramConstTest method testConvertLists.

public void testConvertLists() {
    List<List<LatLon>> positionLists = new ArrayList<>();
    List<LatLon> positions1 = new ArrayList<>();
    positionLists.add(positions1);
    List<LatLon> positions2 = new ArrayList<>();
    positions2.add(new OsmLatLon(1, 2));
    positions2.add(new OsmLatLon(3, 4));
    positionLists.add(positions2);
    List<LatLon> positions3 = new ArrayList<>();
    positions3.add(new OsmLatLon(5, 6));
    positionLists.add(positions3);
    List<List<LatLon>> positionLists2 = TangramConst.toLatLon(TangramConst.toLngLat(positionLists));
    assertEquals(positionLists, positionLists2);
}
Also used : LatLon(de.westnordost.osmapi.map.data.LatLon) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon) ArrayList(java.util.ArrayList) List(java.util.List) ArrayList(java.util.ArrayList) OsmLatLon(de.westnordost.osmapi.map.data.OsmLatLon)

Aggregations

OsmLatLon (de.westnordost.osmapi.map.data.OsmLatLon)61 LatLon (de.westnordost.osmapi.map.data.LatLon)33 ArrayList (java.util.ArrayList)24 BoundingBox (de.westnordost.osmapi.map.data.BoundingBox)9 ElementGeometry (de.westnordost.streetcomplete.data.osm.ElementGeometry)9 Date (java.util.Date)8 List (java.util.List)8 OsmQuest (de.westnordost.streetcomplete.data.osm.OsmQuest)7 Note (de.westnordost.osmapi.notes.Note)6 OsmNode (de.westnordost.osmapi.map.data.OsmNode)5 TestQuestType (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType)5 Element (de.westnordost.osmapi.map.data.Element)4 TestQuestType2 (de.westnordost.streetcomplete.data.osm.persist.test.TestQuestType2)4 Node (de.westnordost.osmapi.map.data.Node)3 NoteComment (de.westnordost.osmapi.notes.NoteComment)3 HashMap (java.util.HashMap)3 Point (android.graphics.Point)2 Rect (android.graphics.Rect)2 LongSparseArray (android.util.LongSparseArray)2 QuestGroup (de.westnordost.streetcomplete.data.QuestGroup)2