congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
Point.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.geojson.Point
constructor

Best Java code snippets using org.geojson.Point.<init> (Showing top 6 results out of 315)

origin: opentripplanner/OpenTripPlanner

  geomSerializer.writeValue(jgen, p);
} else {
  org.geojson.Point p = new org.geojson.Point(lons[i], lats[i]);
  geomSerializer.writeValue(jgen, p);
origin: org.schoellerfamily.gedbrowser/geoservice-persistence

  /**
   * Create a GeoJSON Point from a LatLng.
   *
   * @param latLng the LatLng
   * @return the GeoServiceLatLng
   */
  default Point toPoint(final LatLng latLng) {
    if (latLng == null) {
      return null;
    }
    return new Point(latLng.lng, latLng.lat);
  }
}
origin: opendatakit/briefcase

 private Feature buildFeature() {
  Feature feature = new Feature();
  feature.setGeometry(new Point(Math.random() * 360 - 180, Math.random() * 180 - 90));
  feature.setProperty("key", instanceIdSeq.getAndIncrement());
  feature.setProperty("field", "some-field");
  feature.setProperty("empty", "no");
  feature.setProperty("valid", "yes");
  return feature;
 }
}
origin: sinergise/Sentinel2ProductIngestor

public static org.geojson.Point toGeoJson(Point jtsPoint) {
  if (jtsPoint == null)
    return null;
  org.geojson.Point geoJsonPoint = new org.geojson.Point(new LngLatAlt(jtsPoint.getX(), jtsPoint.getY()));
  geoJsonPoint.setCrs(createCrsForEpsgCode(jtsPoint.getSRID()));
  return geoJsonPoint;
}
origin: org.schoellerfamily.gedbrowser/geoservice-persistence

  /**
   * Create a GeoJSON Point from a LatLng.
   *
   * @param latLng the LatLng
   * @param locationType the location type
   * @return the GeoServiceLatLng
   */
  default Feature toLocationFeature(final LatLng latLng,
      final LocationType locationType) {
    if (latLng == null) {
      final Feature feature = new Feature();
      feature.setProperty("locationType", locationType);
      feature.setId("location");
      return feature;
    }
    final Point point = new Point(latLng.lng, latLng.lat);
    final Feature feature = new Feature();
    feature.setGeometry(point);
    feature.setProperty("locationType", locationType);
    feature.setId("location");
    return feature;
  }
}
origin: opendatakit/briefcase

@Test
public void transforms_a_submission_to_a_feature_list() throws IOException, XmlPullParserException {
 Map<String, Feature> features = getFeatures(
   Pair.of(GEOPOINT, "1 2 3"),
   Pair.of(GEOTRACE, "1 2;3 4"),
   Pair.of(GEOSHAPE, "1 2;3 4;5 6;1 2")
 ).stream().collect(toMap(
   f -> f.getProperty("field"),
   f -> f
 ));
 assertThat(features.values(), hasSize(3));
 assertThat(features.values(), allMatch(feature -> feature.getProperty("key").equals("uuid:39f3dd36-161e-45cb-a1a4-395831d253a7")));
 assertThat(features.values(), allMatch(feature -> feature.getProperty("empty").equals("no")));
 assertThat(features.get("some-field-1").getGeometry(), is(new Point(2, 1, 3)));
 assertThat(features.get("some-field-2").getGeometry(), is(new LineString(new LngLatAlt(2, 1), new LngLatAlt(4, 3))));
 assertThat(features.get("some-field-3").getGeometry(), is(new Polygon(new LngLatAlt(2, 1), new LngLatAlt(4, 3), new LngLatAlt(6, 5), new LngLatAlt(2, 1))));
}
org.geojsonPoint<init>

Popular methods of Point

  • getCoordinates
  • setCrs

Popular in Java

  • Making http requests using okhttp
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • scheduleAtFixedRate (Timer)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • BoxLayout (javax.swing)
  • Table (org.hibernate.mapping)
    A relational table
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now