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

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

Best Java code snippets using de.topobyte.osm4j.core.model.iface.OsmNode (Showing top 3 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: FutureCitiesCatapult/TomboloDigitalConnector

@Override
public void handle(OsmNode node) throws IOException
{
  // We are not interested in the node tags, but just the coordinates to create a geometry for the ways
  nodes.put(node.getId(), node);
  handleEntity(node, builder.build(node));
}
origin: mojodna/osm2orc

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

Most used methods

  • getLatitude
  • getLongitude
  • getId

Popular in Java

  • Reactive rest calls using spring rest template
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • putExtra (Intent)
  • getSharedPreferences (Context)
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Dictionary (java.util)
    The Dictionary class is the abstract parent of any class, such as Hashtable, which maps keys to valu
  • ImageIO (javax.imageio)
  • BoxLayout (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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