Skip to content

Commit

Permalink
Feat: Created Geohash class and its skeletton Esri#213
Browse files Browse the repository at this point in the history
  • Loading branch information
muchembledMartin committed Mar 2, 2024
1 parent e0bef0b commit af667b6
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/main/java/com/esri/core/geometry/Geohash.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
package com.esri.core.geometry;


/**
* Helper class to work with geohash
*/
public class Geohash {

/**
* Create an evelope from a given geohash
* @param geoHash
* @return The envelope that corresponds to the geohash
*/
public static Envelope2D geohashToEnvelope(String geoHash){
return null;
}

/**
* Computes the geohash that contains a point at a certain precision
* @param pt
* @param characterLength - The precision of the geohash
* @return The geohash of containing pt as a String
*/
public static String toGeohash(Point2D pt, int characterLength){
return "";
}

/**
* Compute the longest geohash that contains the envelope
* @param envelope
* @return the geohash as a string
*/
public static String containingGeohash(Envelope2D envelope){
return "";
}

/**
*
* @param envelope
* @return up to four geohashes that completely cover given envelope
*/
public static String[] coveringGeohash(Envelope2D envelope){
return new String[]{};
}
}

0 comments on commit af667b6

Please sign in to comment.