code: public static long getTileColumn(BoundingBox totalBox, long matrixWidth,
  			double longitude) {
  
  		double minX = totalBox.getMinLongitude();
  		double maxX = totalBox.getMaxLongitude();
  
  		long tileId;
  		if (longitude < minX) {
  			tileId = -1;
  		} else if (longitude >= maxX) {
  			tileId = matrixWidth;
  		} else {
  			double matrixWidthMeters = totalBox.getMaxLongitude()
  					- totalBox.getMinLongitude();
  			double tileWidth = matrixWidthMeters / matrixWidth;
  			tileId = (long) ((longitude - minX) / tileWidth);
  		}
  
  		return tileId;
  	}
docs: Get the tile column of the longitude in constant units
  
  @param totalBox
  total bounding box
  @param matrixWidth
  matrix width
  @param longitude
  in constant units
  @return tile column if in the range, -1 if before,
  {@link TileMatrix#getMatrixWidth()} if after