Codota Logo
OsmNode.getLatitude
Code IndexAdd Codota to your IDE (free)

How to use
getLatitude
method
in
de.topobyte.osm4j.core.model.iface.OsmNode

Best Java code snippets using de.topobyte.osm4j.core.model.iface.OsmNode.getLatitude (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
ArrayList a =
  • Codota Iconnew ArrayList<String>()
  • Codota Iconnew ArrayList()
  • Codota Iconnew ArrayList<Object>()
  • Smart code suggestions by Codota
}
origin: gegy1000/Terrarium

  private boolean isWayInBounds(OsmWay way, double minLatitude, double minLongitude, double maxLatitude, double maxLongitude) {
    double wayMinLatitude = Double.MAX_VALUE;
    double wayMinLongitude = Double.MAX_VALUE;
    double wayMaxLatitude = -Double.MAX_VALUE;
    double wayMaxLongitude = -Double.MAX_VALUE;

    for (int i = 0; i < way.getNumberOfNodes(); i++) {
      try {
        OsmNode node = this.getNode(way.getNodeId(i));
        double latitude = node.getLatitude();
        if (latitude < wayMinLatitude) {
          wayMinLatitude = latitude;
        }
        if (latitude > wayMaxLatitude) {
          wayMaxLatitude = latitude;
        }
        double longitude = node.getLongitude();
        if (longitude < wayMinLongitude) {
          wayMinLongitude = longitude;
        }
        if (longitude > wayMaxLongitude) {
          wayMaxLongitude = longitude;
        }
      } catch (EntityNotFoundException e) {
      }
    }

    return minLatitude < wayMaxLatitude && maxLatitude > wayMinLatitude && minLongitude < wayMaxLongitude && maxLongitude > wayMinLongitude;
  }
}
origin: mojodna/osm2orc

if (!Double.isNaN(node.getLatitude())) {
  lat.set(row, HiveDecimal.create(node.getLatitude()));
de.topobyte.osm4j.core.model.ifaceOsmNodegetLatitude

Popular methods of OsmNode

  • getLongitude
  • getId

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • Path (java.nio.file)
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now