Package org.elasticsearch.index.search.geo

Source Code of org.elasticsearch.index.search.geo.GeoHashUtils

package org.elasticsearch.index.search.geo;

import org.elasticsearch.common.geo.GeoPoint;

public class GeoHashUtils {
 
  public static String encode(double lat, double lon) {
    return org.elasticsearch.common.geo.GeoHashUtils.encode(lat, lon);
  }
 
  public static double[] decode(String geohash) {
    GeoPoint x = org.elasticsearch.common.geo.GeoHashUtils.decode(geohash);
    double retVal[] = { x.getLat(), x.getLon() };
    return retVal;
  }
 
}
TOP

Related Classes of org.elasticsearch.index.search.geo.GeoHashUtils

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.