congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reactive rest calls using spring rest template
  • getResourceAsStream (ClassLoader)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (ScheduledExecutorService)
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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