Examples of LatLong


Examples of com.linkedin.restli.example.LatLong

    for (int i = 0; i < numInitPhotos; i++)
    {
      final long id = _currId.incrementAndGet();
      final PhotoFormats[] formats = PhotoFormats.values();

      final LatLong ll = new LatLong().setLatitude(r.nextFloat() * 180 - 90).setLongitude(r.nextFloat() * 180 - 90);
      final EXIF e = new EXIF().setLocation(ll);
      final Photo p = new Photo().setId(id)
          .setUrn(String.valueOf(id))
          .setTitle("Photo " + id)
          .setFormat(formats[r.nextInt(formats.length)])
View Full Code Here

Examples of com.linkedin.restli.example.LatLong

      return createPhoto(title, PhotoFormats.PNG);
  }

  private Long createPhoto(String title, PhotoFormats format)
  {
      final LatLong l = new LatLong().setLatitude(7.0f).setLongitude(27.0f);
      final EXIF e = new EXIF().setIsFlash(true).setLocation(l);
      final Photo p = new Photo().setTitle(title).setFormat(format).setExif(e);
      final CreateResponse cResp = _res.create(p);
      Assert.assertTrue(cResp.hasId());
      return (Long) cResp.getId();
View Full Code Here

Examples of com.linkedin.restli.example.LatLong

    Assert.assertNotNull(p);
    Assert.assertEquals(p.getId(), id);
    Assert.assertTrue(p.hasExif());
    final EXIF e = p.getExif();
    Assert.assertTrue(e.hasLocation());
    final LatLong l = e.getLocation();
    Assert.assertEquals(l.getLatitude(), 7.0f);
    Assert.assertEquals(l.getLongitude(), 27.0f);
  }
View Full Code Here

Examples of com.linkedin.restli.example.LatLong

      Assert.assertEquals(p.getTitle(), titles[i]);
      Assert.assertEquals(p.getId().longValue(), ids[i]);
      Assert.assertTrue(p.hasExif());
      final EXIF e = p.getExif();
      Assert.assertTrue(e.hasLocation());
      final LatLong l = e.getLocation();
      Assert.assertEquals(l.getLatitude(), 7.0f);
      Assert.assertEquals(l.getLongitude(), 27.0f);
    }
  }
View Full Code Here

Examples of com.linkedin.restli.example.LatLong

  @Test
  public void testResourceUpdate()
  {
    final Long id = createPhoto();

    final LatLong l1 = new LatLong().setLongitude(-27.0f);
    final EXIF e1 = new EXIF().setLocation(l1);
    final Photo p1 = new Photo().setExif(e1);
    final UpdateResponse uResp = _res.update(id, p1);
    Assert.assertEquals(uResp.getStatus(), HttpStatus.S_204_NO_CONTENT);

    // validate data is changed to correct value
    final Photo p2 = _res.get(id);
    Assert.assertNotNull(p2.hasExif());
    final EXIF e2 = p2.getExif();
    Assert.assertNotNull(e2.hasLocation());
    final LatLong l2 = e2.getLocation();
    Assert.assertEquals(l2.getLongitude(), -27.0f);
  }
View Full Code Here

Examples of com.voyagegames.core.LatLong

  public final LatLong value;
 
  public MapQuestLatLongJson(final JsonObject obj) {
    super(obj, REQUIRED_OBJECTS);
   
    value = new LatLong(obj.values.get("lat").numberValue(), obj.values.get("lng").numberValue());
  }
View Full Code Here

Examples of org.jscience.geography.coordinates.LatLong

            System.out.println("Coordinates Conversions");

            // Simple Lat/Long to UTM conversion.
            CoordinatesConverter<LatLong, UTM> latLongToUTM = LatLong.CRS
                    .getConverterTo(UTM.CRS);
            LatLong latLong = LatLong.valueOf(34.34, 23.56, DEGREE_ANGLE);
            UTM utm = latLongToUTM.convert(latLong);
            System.out.println(utm);

            // Lat/Long to XYZ conversion (assume height of zero).
            CoordinatesConverter<LatLong, XYZ> latLongToXYZ = LatLong.CRS
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.